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
-
I mean, it has its benefits to think of *anything* as an object, that has a ToString method
-
jeeper58094y@petergriffin lol how often do you get the error Object[object] in JS. It’s a prototyped language, as abstracted as they come...in theory.
-
@jeeper more often than you want. Especially if you have to use shitty libraries or react+redux without typescript and proper abstraction.
Also, you often use the raw prototype objects in TS when you use something like decorators. -
reflection:
class beerClass = getClass("beer")
obj beerObject = newInstanceOf(beerClass, null)
met holdMet = getPublicMethod(beerClass, "hold", null)
result = invokeMethod(beerObj, holdMet, null)
Yup. OOP is fun! -
@magicMirror Why are you calling reflection methods with string literals?
The only excuse for reflection is if you want to represent structure with OOP but apply it on runtime data, and even then you'd probably be better off generating marshal methods. -
@homo-lorens
bc that is the way to use reflection in Java an Go?
Does it make sense? no. But who cares?
Related Rants
Me: Keep the abstractions in check. Go too far and you'll end up with something called 'thing' or 'object'!
C#: Hold my beer 🍺🍺🍺
joke/meme
abstraction
object
c#