Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <2236602.lXzdT72UIO@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Tue, 01 Jan 2013 01:32:55 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <$D5iY2DKyC4QFwcL@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> <4PV2RQBpIX4QFwNk@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 48 NNTP-Posting-Date: 01 Jan 2013 01:32:56 CET NNTP-Posting-Host: 9f621123.newsspool3.arcor-online.net X-Trace: DXC=S`Q3O>a4XO>n`gW2MTm]<3McF=Q^Z^V384Fo<]lROoR18kFYBYU3JEo=70L\fN3chn2 X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17904 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