3 ms·
The "magic" about the strings in ASP.NET MVC is that the name of certain strings define which method gets called further down the line. That's exactly what dyna
by skrebbel 11y ago
The "magic" about the strings in ASP.NET MVC is that the name of certain strings define which method gets called further down the line. That's exactly what dynamically typed languages do. Typos are caught at runtime, not at compile time, and possibly with cryptic errors if you're unlucky. The GP is used to C#, where (except if you use MVC), typos are immediately highlighted by the editor.
Your definition of "magic" is much stronger than that, so by accident of not entirely understanding the GP's complaint, you think we're moving goalposts.
- rglullis 11y agoWhile your answer does help in clarifying some misunderstanding ("magic string" to me is supposed to mean something else entirely), it still conflates programming languages with frameworks. ASP.NET MVC is not a language, as far as I know. Also, most "dynamic languages" have linters and syntax analyzers that you can hook up to your editor. If I have a typo in my code, flake8 will find it right away, and I don't need to run the code to do it.