Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26361

Re: Optional semicolons - wrong rule or wrong example?

From Tim Streater <timstreater@greenbee.net>
Newsgroups comp.lang.javascript
Subject Re: Optional semicolons - wrong rule or wrong example?
Date 2014-12-18 14:04 +0000
Message-ID <181220141404027857%timstreater@greenbee.net> (permalink)
References <4ca7db7d-5a3b-457d-8601-aa9c72afab36@googlegroups.com> <5492d90d$0$2851$e4fe514c@news2.news.xs4all.nl>

Show all headers | View raw


In article <5492d90d$0$2851$e4fe514c@news2.news.xs4all.nl>, Erwin
Moller <erwinmollerusenet@xs4all.nl> wrote:

>My advice:
>When things are confusing, strive to make them clear.
>Don't rely on (poorly understood) rules to solve the problem.
>Simply avoid the problem.
>
>In this case: Simply stick to using a semicolon, even if you are allowed 
>to omit it.
>
>This case reminds me of order of operations: (multiply, power, addition, 
>division, modulo, etc)
>http://en.wikipedia.org/wiki/Order_of_operations#Programming_languages
>
>I don't know that list by heart, so I use parenthesis a lot to make the 
>order clear.

This is very good advice.

-- 
"If you're not able to ask questions and deal with the answers without feeling 
that someone has called your intelligence or competence into question, don't 
ask questions on Usenet where the answers won't be carefully tailored to avoid
tripping your hair-trigger insecurities."                  - D M Procida, UCSM

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Optional semicolons - wrong rule or wrong example? Peter <pilarp@poczta.onet.pl> - 2014-12-16 13:58 -0800
  Re: Optional semicolons - wrong rule or wrong example? "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-16 23:21 +0100
  Re: Optional semicolons - wrong rule or wrong example? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-17 00:10 +0100
    JavaScript: The Definitive Guide (was: Optional semicolons - wrong rule or wrong example?) "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-17 01:29 +0100
      Re: JavaScript: The Definitive Guide Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-20 23:00 +0100
        Re: JavaScript: The Definitive Guide Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-20 23:04 +0100
        Re: JavaScript: The Definitive Guide "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-12-28 23:52 +0100
          Re: JavaScript: The Definitive Guide Tim Streater <timstreater@greenbee.net> - 2014-12-28 23:52 +0000
            Re: JavaScript: The Definitive Guide Scott Sauyet <scott.sauyet@gmail.com> - 2015-01-01 21:46 -0800
              Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-02 09:32 +0100
                Re: JavaScript: The Definitive Guide Andrew Poulos <ap_prog@hotmail.com> - 2015-01-03 07:54 +1100
                Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-02 22:14 +0100
                Re: JavaScript: The Definitive Guide Andrew Poulos <ap_prog@hotmail.com> - 2015-01-03 11:46 +1100
                Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-03 11:59 +0100
                Re: JavaScript: The Definitive Guide Andrew Poulos <ap_prog@hotmail.com> - 2015-01-03 23:46 +1100
                Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-03 14:57 +0100
                Re: JavaScript: The Definitive Guide Andrew Poulos <ap_prog@hotmail.com> - 2015-01-04 09:31 +1100
                Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-04 00:29 +0100
                Re: JavaScript: The Definitive Guide Andrew Poulos <ap_prog@hotmail.com> - 2015-01-04 20:17 +1100
                Re: JavaScript: The Definitive Guide "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-01-04 10:57 +0100
                OT: Mass, weight and friction (was: JavaScript: The Definitive Guide) "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-01-03 02:52 +0100
  Re: Optional semicolons - wrong rule or wrong example? Erwin Moller <erwinmollerusenet@xs4all.nl> - 2014-12-18 14:39 +0100
    Re: Optional semicolons - wrong rule or wrong example? Tim Streater <timstreater@greenbee.net> - 2014-12-18 14:04 +0000

csiph-web