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


Groups > comp.lang.javascript > #17904

Re: FAQ Topic - What is ECMAScript? (2012-12-30)

Message-ID <2236602.lXzdT72UIO@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2013-01-01 01:32 +0100
Subject Re: FAQ Topic - What is ECMAScript? (2012-12-30)
Newsgroups comp.lang.javascript
References (1 earlier) <hn6vd8hff4ltq6j7emfuaus6n8kkk777nb@4ax.com> <$D5iY2DKyC4QFwcL@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <fbm1e8ph63dh6g466foaq06a3042t75d57@4ax.com> <4PV2RQBpIX4QFwNk@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <f364e8p3ap5k2tj4c2jagivlusio3scv04@4ax.com>
Followup-To comp.lang.javascript

Followups directed to: comp.lang.javascript

Show all headers | View raw


Jeff North wrote:

> John G Harris […] wrote:

Please do not post attribution novels, and do use common, unambiguous quote 
prefixes.  “|” is for third-party quotes only.
 
> Side note: I teach the correct methods for using curly brackets
                     ^^^^^^^^^^^^^^^^^^^
What are those, IYHO?

> but if I see that the students are getting confused about where and when
> to include/omit the brackets I then tell them to place curly brackets
> around everything.

Which is recommended for several C-family languages, and can be enforced by 
good editors (for example, Eclipse JSDT has a Save Action for that).

> Does it 'hurt the code' - no.

ACK.  It certainly makes code easier to read and maintain: you can see 
clearly, even with borken indentation, which lines belong to the control 
statement, and it is easier to add more statements related to that 
statement.

And if you compact tested production code for serving it via HTTP, it does 
not matter if there is a one more newline in the original code.  Data 
storage has become that inexpensive that readability and maintainability is 
more important than size there.

> Does it mean they are terrible programmers - no.

IMHO they will even become better programmers because they will have learned 
the importance of a consistent code style.  I am still somewhat slow to use 
Block statements with simple ”if” statements (especially in examples); but 
the good argument I read in this newsgroup stuck, and I have enabled the 
aforementioned Save Action for most of my ES/JS projects since then (having 
used Visual Studio 2010 recently, I wished Eclipse [JSDT] could also 
automatically correct the indentation of the preceding code when I write a 
closing brace).


PointedEars
-- 
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee

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


Thread

FAQ Topic - What is ECMAScript? (2012-12-30) "FAQ server" <javascript@dotinternet.be> - 2012-12-30 00:00 +0000
  Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2012-12-30 12:39 +1100
    Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2012-12-30 11:59 +0000
      Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2012-12-31 11:19 +1100
        Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2012-12-31 11:08 +0000
          Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2013-01-01 10:16 +1100
            Re: FAQ Topic - What is ECMAScript? (2012-12-30) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-01 01:32 +0100
              Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2013-01-02 15:10 +0000
            Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2013-01-01 10:35 +0000
              Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2013-01-01 23:58 +1100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2013-01-01 16:16 +0000
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2013-01-02 11:35 +1100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2013-01-02 15:39 +0000
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Patricia Shanahan <pats@acm.org> - 2013-01-02 08:36 -0800
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-02 20:54 +0100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-03 19:41 +0000
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Andrew Poulos <ap_prog@hotmail.com> - 2013-01-04 12:38 +1100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-04 13:59 +0100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-01-04 14:17 +0100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Gene Wirchenko <genew@telus.net> - 2013-01-04 08:42 -0800
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Jeff North <jnorthau@yahoo.com.au> - 2013-01-03 12:49 +1100
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-03 19:39 +0000
                Re: FAQ Topic - What is ECMAScript? (2012-12-30) John G Harris <john@nospam.demon.co.uk> - 2013-01-04 10:46 +0000
      Re: FAQ Topic - What is ECMAScript? (2012-12-30) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2012-12-31 20:05 +0000

csiph-web