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
HN user
1day1day
3 karma
Posts0
Comments2
No posts found.
Skit – I built another JavaScript framework 11 years ago
New-less JavaScript (2013) 11 years ago
"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