by rglullis · 10y ago · 0 comments
Javascript has really bad type coercion, no doubt. But there is nothing on the language that is built upon these concepts.
And I don't get the comparison between Rails (a framework that, indeed, does use a lot of "magic" in the naming of the classes) to programming languages.
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.
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.
If these would count as "magic", so would any language that supports operator-overloading and templates, which basically means that even C and C++ have "magic strings".
Still, you got close. If there is one thing that I could accept as "magic" is the fact that Python changes the accessor of functions if the function name starts with double underscore (but not if it also ends with double underscores). Even that would be debatable, because the behavior is well-defined and the transformation is simple.
The same thing goes for a bunch of the `ContentType` stuff where you address specific instances generically using the string `applabel.modelname.id`.
Edit: Oops, misread. This is Django specifically, not Python generally.