Earlier quoted context omitted.
A lot of the orm style things are not really feasible in static-er languages without clunky approaches like codegen.
What part specifically? Java is (in)famous for its orms after all. Unless you want to count that as clunky codegen? I'd argue that all metaprogramming boils down to that though.
Python's “disappointing” superpowers
71–80 of 264 posts
Re: Python's “disappointing” superpowers
#72Earlier quoted context omitted.
How come everyone realised the benefits of typing by now, except the Python community?
The benefits of typing for certain kinds of applications . Many people in the Python community simply aren't writing those kinds of applications. They're writing applications where typing is not a benefit, it's a hindrance, so they don't use it, and Python makes that easy.
Re: Python's “disappointing” superpowers
#73Metaprogramming does not require dynamic types, but this post seems to equate them. As far as I can see all this could be done in e.g. Java (and probably is). IME this kind of "magic" very quickly loses its appeal when you have to debug it. The author's idea of libraries wrapping this stuff up so users don't have to care about it just doesn't pan out at all in my experience.
Re: Python's “disappointing” superpowers
#74Either embrace dynamic typing and provide good error guards...or try to use type hints and still make good error guards. We had an entire history of Python 2 without type hints. Why use them now?
And most of that python2 code is completely rotted.
Re: Python's “disappointing” superpowers
#75Static typing, compile time checks just win in the long run. And with languages like kotlin you still have all the advantages, and you have nice tools like python has which execute at COMPILE time using DSL, which are type safe themselve..
Python has become mostly a toy language for me to write scripts in.
Re: Python's “disappointing” superpowers
#76Either embrace dynamic typing and provide good error guards...or try to use type hints and still make good error guards. We had an entire history of Python 2 without type hints. Why use them now?
How come everyone realised the benefits of typing by now, except the Python community?
And Python has a ton of newbies, college kids etc. Though this is also true of JavaScript.
As an industrial language/environment with best practices for very large codebases, it's really weak and I much prefer TypeScript despite the occasional tooling fatigue (has slowed down).
But a ton of money has been poured into JavaScript (v8) which really set that into motion.
Re: Python's “disappointing” superpowers
#77When I did most of my work in Python, typehints weren't a thing. I still feel like static typechecking is less useful in Python since its datamodel is overally less of a hot mess compared to Javascript for example. And Python modules/frameworks can be a lot more "typed" than you'd expect. Django models, forms etc offer more runtime validation than typesystems can easily achieve. Yes, at runtime. But between not havin…
> its datamodel is overally less of a hot mess compared to Javascript for example. I don't understand this, what do you mean? TypeScript is such a success partly because everything is an object in Javascript. There's no need to distinguish between classes and "dicts", as you have to with Python. Another example: Python functions have args and kwargs, which make typing significantly more complex (as the article points…
Re: Python's “disappointing” superpowers
#78Metaprogramming does not require dynamic types, but this post seems to equate them. As far as I can see all this could be done in e.g. Java (and probably is). IME this kind of "magic" very quickly loses its appeal when you have to debug it. The author's idea of libraries wrapping this stuff up so users don't have to care about it just doesn't pan out at all in my experience.
This is cool if it works. Good luck when it doesn't due to user error, and more luck if it doesn't due to a bug.
You need to develop a whole strategy to tell the user what went wrong and how, and why, basically from scratch; admitting that you didn't, in fact, execute the generator, and that they have to change it. because of that.
It's pretty awesome that it's possible. And it would be pretty amazing to write something like that. But... idk if it's a good idea from a developer stand point. I like being able to understand what's happening in a library with a single click.
Re: Python's “disappointing” superpowers
#79Earlier quoted context omitted.
The benefits of typing for certain kinds of applications . Many people in the Python community simply aren't writing those kinds of applications. They're writing applications where typing is not a benefit, it's a hindrance, so they don't use it, and Python makes that easy.
Could you give an example of a type of application where typing is a hindrance?