|
|
|
|
|
by moron4hire
191 days ago
|
|
I would say that reflection in JS is terrible compared to .NET. You can only just barely figure out what is in an object, but it's a hell of a time figuring out what any of those things can do. I wouldn't so much as call what JS does "reflection" any more than "making objects out of poorly implemented hashmaps." |
|
There's a couple really well documented and understood ways of doing this in the language. I'm not sure what you're specifically referencing without more information.
>I wouldn't so much as call what JS does "reflection" any more than "making objects out of poorly implemented hashmaps."
Is this anymore different than .NET deriving everything from a base `System.Object`[0] type?
Also, what is missing in JS reflection wise that you can't do that would make sense for its environment? (namely, this excludes compile time reflection stuff I know .NET can do, it wouldn't make sense for a scripting language as it currently is)
[0]: https://learn.microsoft.com/en-us/dotnet/api/system.object?v...