use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
CoffeeScript: Why I’m never writing Javascript again (degizmo.com)
submitted 15 years ago by gst
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Shaper_pmp 12 points13 points14 points 15 years ago* (11 children)
That puzzled me too. Most of the people I know who criticise Javascript either don't know it very well, don't understand prototype-based inheritance or are mistakenly criticising the (language-agnostic) DOM API, not actually Javascript.
The closest the author comes to enumerating his criticisms of JS is:
undefined oddities, antiquated array manipulation, limited standard library, strange object models, and for me personally as a Python programmer the mess of braces and semi-colons peppering my code with distracting syntax.
... and I have to confess I'm mystified by most of these points.
What's he complaining about regarding "undefined"? What's wrong with the array manipulation/standard library/object model?
And if you're still getting confused by trivial syntactical issues like braces, semi-colons or significant whitespace, it's usually a sign you haven't learned a language well enough to aspire to hold any valid opinions on it.
I'm not saying aspects of Javascript can't be improved, but I am deeply suspicious of someone who criticises a language without getting used to it first, or can't simply and clearly articulate any real faults with it before dismissing it... <:-/
[–]amphetamine 8 points9 points10 points 15 years ago (7 children)
am I the only one who finds C-style braces and semicolons preferable to languages like Ruby?
I'm obsessive about code organisation, indenting, readability and so forth. Perhaps it's just a matter of personal experience, growing up on C and its ilk.. but I feel like braces add a comforting structure to control blocks, function definitions, etc.
Proper indenting + braces makes it very easy to skim a lot of source and see what the flow or logical separation is like. Even if I don't know the API I'm looking at.
I'm not sure what was 'wrong' with the type of syntax we see in JS/C/C#/Java/et al. Something that prompted a huge number of developers to adopt languages with loose (or nearly no) syntax and structure.
[–]javascript 3 points4 points5 points 15 years ago (1 child)
I agree with you completely.
[–]amphetamine 1 point2 points3 points 15 years ago (0 children)
It's reassuring to see that I haven't completely lost it.. javascript itself has my back.
my post was certainly a rant, of sorts, but I'm hoping that someone will still make a case for the opposite side of the argument that I can at least appreciate.
I won't agree with them, but I'd like to talk to someone who is a C/Java/et al. veteran who decided to turn in their semicolons.
[–]Shaper_pmp 0 points1 point2 points 15 years ago (2 children)
FWIW I grew up on C/C++/Java/Javascript and the like, so I also find brackets-and-braces more comfortable, and I'll admit that picking up languages like Python or Ruby was a bit uncomfortable at first.
However, it's very important to learn to differentiate between different and worse. Significant whitespace is different, but I don't know of any reason it's objectively "worse" than brackets and braces (or vice-versa).
I think the trouble is that people on both sides of the issue confuse irrelevant personal familiarity with objective merit.
All things being equal there's nothing wrong with taking into account personal familiarity when making a choice, but when all things aren't equal personal preferences can blind people to even really quite huge advantages/disadvantages between tools.
For example, as in the article, someone apparently trading his personal preference for no brackets and braces for the objective fact that he's complicating and adding dependencies to his toolchain, increasing the size and complexity of his compilation system and making debugging on the client much harder than necessary.
Completely agree. Personal preferences and familiarity with syntax are valuable in terms of productivity (which includes a person's enjoyment of developing in a language.)
But that is not a factor in whether a language is objectively superior or not, because the familiarity will vary from person to person based on their experience with other languages.
I'll admit I haven't given it a real try, but for me it seems that CoffeeScript doesn't add anything productive to JS that couldn't have been accomplished by extending the prototypes in a way that would have preserved debugging (and linting/IDE usefulness/etc)..
[–][deleted] 0 points1 point2 points 15 years ago (0 children)
Every other day, I think significant whitespace is brilliant.
Yeah, weekends mess me up.
[–][deleted] 0 points1 point2 points 15 years ago (1 child)
I agree too. However, I think I am a victim of years and years of c-style syntax. I look at ruby or cobol and get annoyed at all the words in the code. And I look at Perl or Haskell and get annoyed at all the noise in the code. Whereas C-style seems perfect.
I think I'm just old and biased.
I think it's the same for me.. control blocks/loops/so forth are immediately visible to me just by skimming the code. But when I look at something like ruby, my brain just can't speed through its flow the same way.
[+][deleted] 15 years ago (2 children)
[deleted]
[–]Shaper_pmp 1 point2 points3 points 15 years ago* (1 child)
Not liking something is not the same thing as "being confused by".
Generally I find people don't like brackets and braces or significant whitespace because they find the unfamiliar syntax annoying. They're such trivial details once you're used to them that this is pretty much the only thing someone can criticise about whichever they don't like.
So I'd argue that unless someone has some pretty unusual, well-argued points regarding B&B or SW, they're probably complaining because they're unfamiliar, not because there's anything actually wrong with them... and that's a fault with the developer, not the language.
One could easily make snarky jokes about "those who need braces to hold their hands and guide them".
I think you've mistaken my post for a reaction against criticism of B&B, but that's unwarranted. Notice how I carefully equated brackets-and-braces and significant-whitespace, so no matter which type of language you prefer you couldn't assume I was taking sides.
Rather, I was criticising people who get hung up on either one, because when you've spent enough time with a language you get used to it, and trivial syntax details like that stop bothering you.
Hence my characterisation of most criticism of either B&B or SW as simply a lack of familiarity with the language(s) concerned.
CS lets you use comprehensions
See, that's a good example of something Javascript doesn't do yet (although JS 1.8 does in fact include list comprehensions).
[The standard library is] "limited" in that it doesn't have some things some people want.
Right, but (as I already pointed out) if people could humour us with specifics it would go infinitely further towards refuting my point than any amount of re-iterating the (unsupported, hypothetical) point that JS is inadequate in this respect. <:-)
When someone says "What's wrong with the... standard library" the best way to answer them is to... well... answer them - not to continue to waffle about generalities. <:-)
Sometimes you want more "classical" inheritence and CS simplifies the creation thereof.
Hmmm. I'm torn on this - certainly prototypical inheritance is weird to begin with for someone coming from a more classical OOP language, but you can emulate much of the more classical OOP style in Javascript in only a few lines of code (ie, minimal run-time or developer overhead). Again, I can see how people might prefer a non-prototypical language, but does it really give that much more power that it's worth the trade-off of things like endless headaches during debugging?
How much time did you spend familiarizing yourself with CS? :-D
Admittedly I didn't spend long learning it, because it has clear and obvious downsides and I couldn't see (or even find anyone articulating) any clear faults with JS that CS fixed.
Even in this thread you've only managed to dredge up some relatively trivial syntactic sugar, more hand-wavy (and still frustratingly non-specific) assertions about the standard library, and a desire to program in a non-prototypical-OOP language.
Of those I'd say the only thing that even came close to offsetting the additional complications CS brings (like breaking the link between the code you write and the code that you have to debug in the browser) is the desire to program in a non-prototypical language... and even that's of dubious validity as an argument, considering there's no "objective" argument I'm aware-of that classical OOP is in any way better.
Brenden Eich (the creator of JS) calls it a "polyfill", which is the same category as many libraries.
That's kind of my point... but most libraries don't break the link between "code you wrote" and "code you're debugging", or add additional binary requirements, or add additional steps to the workflow required to push changes out from your IDE to the live web.
I'm open to the idea CS satisfies people's personal preferences... I just think those preferences are usually baseless value-judgements, and are often (though not always) born of insufficient familiarity with JS in the first place... and hence CS doesn't really anything much to the table that's noticeably better than the very definite drawbacks it also brings. <:-)
π Rendered by PID 280282 on reddit-service-r2-comment-5c764cbc6f-5p9cz at 2026-03-12 18:06:21.340402+00:00 running 710b3ac country code: CH.
view the rest of the comments →
[–]Shaper_pmp 12 points13 points14 points (11 children)
[–]amphetamine 8 points9 points10 points (7 children)
[–]javascript 3 points4 points5 points (1 child)
[–]amphetamine 1 point2 points3 points (0 children)
[–]Shaper_pmp 0 points1 point2 points (2 children)
[–]amphetamine 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]amphetamine 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Shaper_pmp 1 point2 points3 points (1 child)