2 comments

[ 3.4 ms ] story [ 14.1 ms ] thread
Fair enough, good suggestions. But if the writer wants this functionality, as opposed to just the syntax, they can all be written right now. So why the desire for this to be a thing?

It's always been one of the strengths of languages with functions as first class objects that 'decorators' are a core part of how you build code. I get that some people find it odd, and prefer a special syntax, but I do worry that more syntactic sugars just serves to further remove new programmers from actually understanding the language.

I'm on the fence about having 'classes' in Javascript, that aren't actually classes. Will it make it easier for new programmers to get productive in Javascript? Maybe. Will it make it harder for developers to get to the modus ponens and really understand the language? Yeah, I think it probably will.

I totally understand what you are saying. In fact, I wrote another blog post about how AngularJS is turning new devs into javascript zombies. For me, writing code is always about eloquence. How can I most eloquently write this so that it is understandable and DRY. I see decorators as a win for this.