Earlier quoted context omitted.
Slightly related question: why do people love Python so much? Or, any dynamically typed language? There's almost nothing that has frustrated me more in a professional setting than trying to figure out what some dynamically typed code is doing and ensuring I don't break anything by making changes.
I have a hunch that a lot of Python users didn't carefully evaluate the language on its merits, but rather, just started using it. In my own case, I was using Visual Basic 6 before Python, and mostly Turbo Pascal before that. A huge attraction of Python was the libraries -- scipy, matplotlib, etc. In fact when a lot of people say they're using "Python," they're actually referring to Python plus a large collection of…
Erg: a statically typed language that is Python compatible
51–60 of 194 posts
Re: Erg: a statically typed language that is Python compatible
#52Earlier quoted context omitted.
>ensuring I don't break anything by making changes I think this is a problem in both static and dynamic languages and is pretty much solved in the same way: you test your code.
But is it the same problem, really? Static typing eliminates a whole class of issues that dynamic typed languages don't. Of course you can still have logical bugs, but it's definitely not the same thing. I don't know how to put it better, but you should try writing haskell sometime and you'll see what I mean.
Re: Erg: a statically typed language that is Python compatible
#53Earlier quoted context omitted.
This is sort of speculation on my part: The fact that static typing PEPs can't easily introduce syntactic changes to the language (I don't think there has been a syntactic change introduced because of static typing ever since Python 3.5) will really hold back Python's static typing from being ergonomic at least, and "fully capable" at the worst. I think that limitation of statically typed Python alone is enough to gi…
I was just playing around with Python 3.10 for the first time today. I made an algebraic/sum-type (dataclasses + typing.Union), then did some structural pattern matching on a value of that type (match statement), and Mypy could tell me statically when the pattern matching wasn't exhaustive! I think it's pretty damn amazing how well Python has been able to evolve into the realm of static typing. And no unofficial supe…
Pylance (the VSCode built-in linter, based on Pyright I believe) tends to do a better job than Mypy, but not as easy to integrate into CI. It's a real shame that the Python ecosystem doesn't have anything nearly as robust as TypeScript.
[0] https://github.com/python/mypy/issues?q=is%3Aopen+is%3Aissue...
Re: Erg: a statically typed language that is Python compatible
#54I have so much trouble when trying to refactor projects bigger than a few hundred lines in python. If I could integrate this into Jupyter easily I'd be excited to try it out.
Re: Erg: a statically typed language that is Python compatible
#55At this point I'm open to try anything that will give me access to the python ecosystem without having to code in Python. From the FAQ it looks like Erg code gets transpiled to python bytecode.
In order for this to succeed, python libraries would have to be rewritten without the C API in the dialect/subset of python supported.
I wonder if erg could strive to use a subset of python mostly and innovate narrowly in just a couple of places to make python more functional.
Re: Erg: a statically typed language that is Python compatible
#56Earlier quoted context omitted.
This is sort of speculation on my part: The fact that static typing PEPs can't easily introduce syntactic changes to the language (I don't think there has been a syntactic change introduced because of static typing ever since Python 3.5) will really hold back Python's static typing from being ergonomic at least, and "fully capable" at the worst. I think that limitation of statically typed Python alone is enough to gi…
I was just playing around with Python 3.10 for the first time today. I made an algebraic/sum-type (dataclasses + typing.Union), then did some structural pattern matching on a value of that type (match statement), and Mypy could tell me statically when the pattern matching wasn't exhaustive! I think it's pretty damn amazing how well Python has been able to evolve into the realm of static typing. And no unofficial supe…
Re: Erg: a statically typed language that is Python compatible
#57Earlier quoted context omitted.
why not use the built in typing? https://docs.python.org/3/library/typing.html
it doesnt enforce the types in any way
Re: Erg: a statically typed language that is Python compatible
#58Earlier quoted context omitted.
But is it the same problem, really? Static typing eliminates a whole class of issues that dynamic typed languages don't. Of course you can still have logical bugs, but it's definitely not the same thing. I don't know how to put it better, but you should try writing haskell sometime and you'll see what I mean.
And static languages introduce a whole class of issues that dynamic languages don't have to deal with. You have to learn a separate metalanguage just for the types that isn't expressive enough to do things that are easy in a dynamic language, and even if it were, you'd still have to write everything twice: once in the real language, and once again in the type language. And then you still have to test, don't pretend y…
I think function definitions should be statically defined, but the actual body of a function could easily stay largely dynamic.
Re: Erg: a statically typed language that is Python compatible
#59Why is the logo 69
Re: Erg: a statically typed language that is Python compatible
#60Earlier quoted context omitted.
Slightly related question: why do people love Python so much? Or, any dynamically typed language? There's almost nothing that has frustrated me more in a professional setting than trying to figure out what some dynamically typed code is doing and ensuring I don't break anything by making changes.
I have a hunch that a lot of Python users didn't carefully evaluate the language on its merits, but rather, just started using it. In my own case, I was using Visual Basic 6 before Python, and mostly Turbo Pascal before that. A huge attraction of Python was the libraries -- scipy, matplotlib, etc. In fact when a lot of people say they're using "Python," they're actually referring to Python plus a large collection of…