4 ms·
> I’m curious why that functionality was added to the language. I think it's because there are a whole bunch of APIs in javascript where there is a function li
by nicoburns 6y ago
> I’m curious why that functionality was added to the language.
I think it's because there are a whole bunch of APIs in javascript where there is a function like `.get("foo")` that internally calls a function called `getFoo` or similar. And this functionality allows such functions to be accurately typed. It basically allows strong typing for stringly typed functions (which are pretty common in dynamic languages)
- ianhorn 6y agoStringly typed functions frustrate me to no end. Tooling for programming gets better every year, yet stringly typed code is so resistant to any of those improvements. Pycharm at some point had to add SQL tools in python strings for gods sake. That kind of weird deep special casing is everywhere with strings drive behavior. Why use a class (inspectable) when a dictionary, a function, and an if statement (opaque) will do?
- AlphaSite 6y agoI think they implemented a generic nested language framework (whose real name eludes me).