logoalt Hacker News

matheusmoreiralast Friday at 12:45 AM1 replyview on HN

Isn't this just a fundamental limitation of dynamic typing?


Replies

moron4hirelast Friday at 1:19 AM

Most of it is not. Most of the data necessary to support reflection should be available to the runtime or else it wouldn't be able to operate. The runtime is parsing the syntax of the function, it should be able to tell if all exit conditions have a return of any kind. It should be able to tell me at least the names of the parameters. It should know if a function is bound to a "this", or of it's a constructor. It just doesn't give any way to tell me.