3 ms·
> I’m worried that a de-facto move away from dynamic stuff in the Python ecosystem, possibly motivated by those who use Python only because they have to, and ju
by paganel 4y ago
> I’m worried that a de-facto move away from dynamic stuff in the Python ecosystem, possibly motivated by those who use Python only because they have to, and just want to make it more like the C# or Java they are comfortable with, could leave us with the very worst of all worlds.
It is certainly happening, and I'm not sure Python the language is all the better for it. I say that as a guy who explicitly mentioned this "Python Is Not Java" blog-post during my first job interview as a professional programmer, more than 15 years ago.
[1] https://dirtsimple.org/2004/12/python-is-not-java.html https://dirtsimple.org/2004/12/python-is-not-java.html
- bayesian_horse 4y agoOver the years C# (and probably Java, but I'm not so well versed in that) gained quite a few features to improve "Meta-Programming", one could argue in an attempt to compete with dynamic languages. In C# that is mainly possible through introspection, generics and maybe dependency injection. Entity Framework Core can mostly figure out an SQL Table and its queries by looking at a simple class. It's not as good as the Django ORM or SQLAlchemy, but it tries to achieve similar things... So maybe some stuff in the Dotnet ecosystem got started because Python programmers were forced to use C# and tried to make that more dynamic.
- acedTrex 4y agoHow is SQLAlchemy or django better at any of that? in my experience EF is far far superior
- bayesian_horse 4y agoMigrations have been painful in EF. No easy way to separate models/migrations for the same db context like with Django apps. Metadata for the models is hard to come by (probably there is a way?). Support for advanced Postgres datatypes slowly becomes ready for primetime, but currently isn't, and it's certainly about ten years behind Django in that regard. In Django, a model alreay contains all the meta data and you need almost no code to generate CRUD views and APIs from it. Can't do that in Dotnet. I think I could make something like that but why bother and take the pain? When dotnet people say "my experience" then they mostly mean no experience beyond dotnet (in my experience). I hope you are basing your comparison on more than a glance or a weekend project trying out Django...
- acedTrex 4y ago> Support for advanced Postgres datatypes slowly becomes ready for primetime, but currently isn't, and it's certainly about ten years behind Django in that regard. What type support is lacking in the ef pg provider? > Metadata for the models is hard to come by (probably there is a way?). I'm not sure what metadata means here exactly, you can configure models with either the fluent api or the attribute api
- bayesian_horse 4y agoJson(b) columns, (multidimensional) Arrays. By metadata I indeed mean info on what a field means: Human readable names, descriptions, hints on validation or user input fields. You can argue that's not the ORM's job, but having some of that already in the ORM allows Django to have CRUD apis and views with very little code beyond the models. I think you could make something like DRF or Django admin on top of EF by abusing assembly introspection. But so far nobody dared to do that.
- pjmlp 4y agoCheck the history of IronPython and IronRuby and how that spun the Dynamic Language Runtime, likewise do the same for jython, jTcl, jRuby and invokedynamic bytecode.
- ok123456 4y agoeval() makes it harder to reason able your code and opens you up to injection attacks. Steering the boat toward C# or Java is better than crashing into TCL.
- deleted 4y ago[deleted]
- simplicio 4y agoMy theory is that Python and C++ are slowly evolving towards eachother, and in 20 years will merge into the same (very confusing) language.
- rich_sasha 4y agoC++ consuming whatever popular paradigm is around and growing into a jumbled mess? Surely you're joking...
- llanowarelves 4y agoC# and typescript towards each other for sure, And everything taking from lisp/other functional languages: lambda, map, filter etc. Which I really like