Hacker News new | past | comments | ask | show | jobs | submit | 1day1day's comments login

I prefer the more verbose, approach. Less magic = less errors. Don't let people show you some snippet that is "less characters = must be better"mentality


I don't think that's the argument. In English, the words "yes" and "no" are very short. Why? Because they're used often. They're not particularly hard to screw up. They're quick to say and quick to write. Similarly, it's good if a framework can use, sure, brevity, in its more common function calls.

Similarly, in jQuery, the most common function call is one character that's obvious if you mess up. You don't have to go to such extremes as `$`, but you should think about that sort of thing when you're designing APIs, imo.


"JavaScript borrowed the new and delete keywords from its less-dynamic predecessor languages. They feel a bit out of place in a garbage collected language and are a source of confusion for newbies "

They are? Delete maybe, due to language symantics - but not new. I think it's unfair to bundle them together in terms of newbie confusion.

Also every time I see one of these type of blog post, discussions in a book the work arounds are even worse.

JS is easy to understand, by the time you need 'new' it is not that difficult an extension of your current knowledge. As far as 'delete' even an advanced JS developer could go a year without calling it


'new' is a source of confusion for newbies and experienced devs alike, sufficiently enough for them to ask questions on SO: http://stackoverflow.com/questions/9468055/what-does-new-in-...

Even I have to refresh my memory on these ambiguous parts of the language from time to time.


Fully agree.

The author probably never used Smalltalk, just to cite one of the oldest dynamic languages.

    btn := Button new.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: