4 ms·
Lambdas have been available for 10+ years. Also, hard disagree on "register" method being simpler. A register method is code, while an annotation is a static
by gf000 8mo ago
Lambdas have been available for 10+ years.
Also, hard disagree on "register" method being simpler. A register method is code, while an annotation is a static declaration, ergo data. The former can happen in a helper function, renaming it from "register" to "path", changing/modifying the parameters, or putting it into some while loop dynamically generating endpoints.
At the very extreme it is Turing complete to figure out what endpoints are registered.
- jim33442 8mo ago10+ years of lambdas, but you can still tell from new code that the language used to not have lambdas. Plenty of code is older than that too. The annotations are static, yeah. That's one advantage. I would still rather not do that. A lot of people were happy not to need that anymore in like NodeJS.
- gf000 8mo agoI mean, there are bad developers in every language. And old code continuing to run 10 years later is a huge value of the platform.
- jim33442 8mo agoAny company that's 10 years old will have code that's 10 years old in every language they use. And every language has some flaw that was "fixed recently" but that's not relevant in a mature codebase. Like "Python packaging is fixed now with uv" no it's not. And especially anything to do with threading vs cooperative multitasking will stick around. Mostly old code will keep working, but there are exceptions like Python 2->3 breakage that deserves all the criticism it got.
- jimbokun 8mo agoYes and with Java they’re the ones still prioritizing annotations over the options built into the core language.
- jimbokun 8mo agoTime again to learn the lesson of Lisp: Code is data. Data is code.