Better HN
topnewbestaskshowjobs
Log inSign up

KlausTrainer

54 karma · joined Jul 24, 2010 (16y ago) · 7 submissions

Submissions

1.

Why You Should Learn COBOL (readwriteweb.com ↗)

13 points · by KlausTrainer · 14y ago · 8 comments

comment 14y ago · link · parent

Maybe the website wouldn't be down right now if it'd run on Go.

3.

Why We Start Indexing from 0 in Computer Science(cs.utexas.edu ↗)

41 points · by KlausTrainer · 15y ago · 35 comments

4.

Trying to Improve CouchDB's Performance with NIFs(groups.google.com ↗)

5 points · by KlausTrainer · 16y ago · 2 comments

5.

Freedoms that Drunks, Slackers, [...] Pioneered and The Founding Fathers Opposed(alternet.org ↗)

2 points · by KlausTrainer · 16y ago · discuss

comment 16y ago · link · parent

> For me it's a 'yes' based on the simple rule that explicit is always better than implicit. That sort of 'optimisation' seems to be really cool when you're just starting out in a language but in the long run it isn't worth it.

I don't really get what you call implicit when you terminate statements with semicolons instead of linebreaks... ... Ok, I get what you're hinting it: there are some (very) few exceptions. However, I cannot see where there is any 'optimisation' in using linebreaks instead of semicolons. You better need to explain why someone should use both linebreaks _and_ semicolons, when only using linebreaks is actually as good as well.

Basically, it's just a matter of style. Aside from a few exceptions (e.g. described in http://inimino.org/~inimino/blog/javascript_semicolons), linebreaks terminate a statement. If you stick with writing only one statement per line, I don't see what's so implicit with it. Rather terminating a statement both with a line break and a semicolon is a tautology, and hence introduces unnecessary redundancy.

The actual question is, whether one can require that developers know the (maybe a handful) exceptions where a line break doesn't terminate a statement. I have decided (for myself) that I can require that knowledge, as it really comes down to only a few exceptions (that I believe are easy to remember).

But, of course, I'm aware that one can also come do another reasonable conclusion.

The only important thing is that people make a concious decision about the issue at all. The importance of this increases with the number of people that are working together on a particular project.

Here a link to another article discussing that issue: http://mislav.uniqpath.com/2010/05/semicolons/