Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API

From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Lensflare gee wonder why you keep complaining about not understanding then (this is sarcasm)
-
@jestdotty not really complaining though. I feel like not understanding what you are talking about is often a blessing, not a curse.
It‘s like little doors to insanity that I'd rather keep closed. -
-
retoor7188dHaha, i said the same when await came to python. Because before, that was a decorator and that was more pythonic. When I heard that an extra keyword would be introduced I was shocked as well. A KEYWORD BEFORE A def? ARE THEY CRAZY? In the end it was OK. Decorators are great for making caching and logging and such. Who cares, in around a year nobody will type code themselves anymore. If the AI uses decorators, we use decorators :P But probably not, they're a year behind always.
-
retoor7188dOh wauw, I just have looked up the syntax how they want to achieve it. It's so good, I already remember it. It's actually very well designed and not raping the syntax at all.
What was really RAPE: # for private variables. Sick fucks. It also looks weird. Like, everyone did already accept `_` right? Or maybe even `__`? Dunno. I do not like the public/private/protected scoping any way. It's only annoying, I do understand that they give information about their preferred usage, but in that case, we can do `_` without giving it a function, like js had before. In that case it's clear too and we can still hack if we want. Bye. -
Typescript has had decorators since ages ago.
JavaScript not really. Only transpilers supported them. TC39 is still stage 3, and in any case will probably break all preexisting decorator implementations.
They are just higher order functions, and they make perfect sense in interpreted languages.
In the end they are mostly used for some kind of reflection, which you could do anyway in languages that do support reflection, but especially useful in type-erasured languages, since it makes it much easier to do reification of generics for library code.
Really not something non-lib devs should worry about. Just add it and watch the magic happen.
they added decorators to JavaScript ಠ_ಠ
that shit is why python made no sense to me, and why I wanted to avoid spring in java
guess my standards are zilch now though. you say jump I say how high
let's make JavaScript look like java. thanks nestjs. I guess since people are using it. the hosting options / fees for these suck. ew lol
gonna just make something stupid with it, that won't be hosted anywhere because heroku banned me ages ago for having actually useful websites
random