[thelist] javascript debug (easy)

Christian Heilmann codepo8 at gmail.com
Mon Jun 6 11:12:15 CDT 2005


> In my opinion, this is one of those coding standards that's strictly for
> newbies and those uncomfortable with script syntax.  Once you become
> comfortable with scripting, there's no reason to include curly braces in
> situations where they are optional.

They don't hurt though, and other languages require them. Keeping the
code in a clean standard syntax might also help JavaScript to be
considered a real skill and not something you hack together at will.

It is very easy to learn JavaScript, as you instantly get results in
your browser. If you start sloppy, you'll just need to learn more
later.

That is why we got taught now useless languages like Pascal in school,
as it taught us proper syntax.
You can learn a human language as a conversational tool, and it is
much easier, but when you want to use it in more instances, then
you'll also need to learn the grammar.

You could apply the same logic to commenting. Why comment when the
code is easy enough to understand? Because you cannot expect the next
developer to have the same skill level you have and it speeds up
handovers.

-- 
Chris Heilmann 
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/  
Binaries: http://www.onlinetools.org/


More information about the thelist mailing list