News for hackers. Stuff that matters.
Re:Show HN: My Turbo Pascal compiler in JavaScript by jk4930 on Saturday October 19, 2013 @03:18AM (#6575656)
To make your comparison more useful (and on-topic), you should compare this to a Pascal or an Ada program. You won't find such a syntax massacre there. In fact some verbosity is a design feature that actually helps programers maintaining large, long-living sytems.
Re:Show HN: My Turbo Pascal compiler in JavaScript by 10098 on Saturday October 19, 2013 @03:41AM (#6575694)
> In fact some verbosity is a design feature that actually helps programers maintaining large, long-living sytems.

I completely agree with that. For example, static typing adds verbosity, but it also documents the program and makes figuring out a large codebase a lot easier. The "noise" can even be reduced in languages with type inference like D, Haskell or C++11.

The thing is, unnecessary verbosity only crowds the code and doesn't add any value. Most of the keywords in "if ... then begin ... end else begin ... end" serve no real purpose and could be replaced with a symbol, like a curly brace.

Re:Show HN: My Turbo Pascal compiler in JavaScript by vidarh on Saturday October 19, 2013 @04:49AM (#6575816)
I have pretty much the exact opposite view: I find type signatures add noise I don't want, while I find {} to be suboptimal for large blocks. I prefer the Ruby approach, where what you described would usually be:

    if
       ...
    else
       ...
    end
So it cuts down on the clutter vs. Pascal, but sticks to words rather than single character symbols
Re:Show HN: My Turbo Pascal compiler in JavaScript by paulrademacher on Saturday October 19, 2013 @05:37AM (#6575891)
What you call "noise" is the compiler catching a type-mismatch bug before it goes out into production.
Re:Show HN: My Turbo Pascal compiler in JavaScript by vidarh on Saturday October 19, 2013 @02:32PM (#6577300)
Type errors are typically trivially caught with units tests that are necessary to verify functionality anyway.

I used to be a strong believer in static typing and insist that dynamic typing would be extremely error prone, but when I actually tried it, I found that the additional testing required is pretty much non-existent - if you test properly, you tend to cover types as a side effect.

I'd still prefer static typing, but only if it doesn't get in the way. And that means minimal annotations, and minimal restrictions.

Re:Show HN: My Turbo Pascal compiler in JavaScript by pjmlp on Saturday October 19, 2013 @05:48PM (#6578017)
Working in the enterprise, with off-shored project modules, will restore your faith in static typing. :)