143
Is TypeScript a fad or is my manager delusional?
(feddit.dk)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Unpopular opinion perhaps, but I rather have a language that allows me to implement hacky solutions than one that requires me to completely scrap and rearchitect everything.
I for example once had to overwrite a dozen or so of prototype methods in a JS class because the library a we were using just fell apart when doing certain things inside a Shadow DOM - it was a library that was released long before that feature. And completely rewriting huge chunks of code that interacted with that library would have wasted 100s of hours and the end result might have been really akward as well since many other systems are architected around how that one library worked. So instead it was a matter of patching in a few checks and workarounds for shadow dom elements.
And since its extremely well documented why we decided to to that, what these hacks do I don't see an issue with that. Obviously this shouldn't be the modus operandi everytime but its always good to have the option i.m.o. to dig yourself out of a hole.
I would argue that overriding methods on a prototype is not a hack. It's equivalent to overriding super methods in Java classes, but using javascript's prototype-based inheritance instead of class-based inheritance.
But I agree with your main point about choosing a language that lets the developer implement their solutions freely.