News for hackers. Stuff that matters.
Re:The melting pot of JavaScript (2017) by pitaj on Tuesday January 08, 2019 @11:41AM (#18856879)
I was talking about JavaScript. In JavaScript there are no typed functions or arguments, so that information doesn't exist period.
Re:The melting pot of JavaScript (2017) by lopatin on Tuesday January 08, 2019 @01:20PM (#18857924)
Right, so I guess I'm not understanding your point about why comparing two languages like this is ridiculous. Java has a full blown runtime reflection system (it's "types exist at runtime"). JS doesn't. So Java wins in the reflection category.
Re:The melting pot of JavaScript (2017) by tracker1 on Tuesday January 08, 2019 @03:43PM (#18859479)
But in JS, reflection is pretty much not needed... I don't need to use reflection to see if an object has a quack method, or that I call it with the right types... I just call instance.quack() ... It's up to you as the developer to keep your interfaces and composition in line.

It's actually WAY easier than with C# or Java. Since the use-case of reflection itself is largely unnecessary.

Re:The melting pot of JavaScript (2017) by lopatin on Saturday January 12, 2019 @09:46PM (#18894719)
Calling a method and seeing what happens is not a substitute for reflection. You can do that in Java too btw.