11 ms·
As with package managers, there seem to be half a dozen different, competing type checkers for Python now...
by dunefox 5y ago
As with package managers, there seem to be half a dozen different, competing type checkers for Python now...
- IshKebab 5y agoYeah and even worse they disagree about type errors! We really need a modern Python alternative. I don't know of any that don't give up the REPL / single file script features which are pretty huge advantages of Python to be honest.
- iudqnolq 5y agoIt's radically different, but the language where I've had the most pleasant repl-driven experience is Elixir. Because of how it's error handling works it's even sane to debug with a repl into live production in some cases.
- fish45 5y agoI've started learning Elixir over the week and I can't see myself using Python for scripting again. They're very different languages but th experience feels similar, except I vastly prefer Elixir
- iudqnolq 5y agoI wouldn't expect elixir to be good at scripting. What sort of libraries do you use?
- Sohcahtoa82 5y agoNode.js has a REPL, and there's nothing stopping you from putting your entire project into a single file.
- IshKebab 5y agoTrue, but to use JavaScript sensibly you really need to use Typescript and ESLint (to ban the crazy old features like `var` and `==`). But I do agree Typescript is one of the best alternatives today if you can stomach `tsconfig.json` `eslintrc` and `node_modules`.
- pjmlp 5y agoAll ML derived languages, Lisp based languages have REPL, you can put everything on one file if you feel like it, and they compile to native code. Then there is Julia as well.
- onerandompotato 5y agoWouldn't Julia be that language? Its fast, supports static typing, and is built from the ground up for machine learning/ data science. It also has a built in REPL.
- N1H1L 5y agoJulia is that language now. Previously I had sunk cost fallacy regarding Python, but now we are building a brand new application from scratch, and we chose Julia.
- IshKebab 5y agoJulia is nothing like Python though, and it has other flaws like 1-based indexing and huge delays loading packages as it compiles them.
- DickieStarshine 5y agoHow is it nothing like Python? 1-based indexing is definitely not a flaw. And version 1.6 massively decreased package import and precompilation time.
- IshKebab 5y ago> 1-based indexing is definitely not a flaw. It really is. We've known it for literally decades: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...
- kescobo 5y agoIt really depends on what you do - sometimes offsets are better, sometimes an index is better. If you really want 0-based indexing, you can have it! https://github.com/JuliaArrays/OffsetArrays.jl https://github.com/JuliaArrays/OffsetArrays.jl My own preference is random indexing, it's so much more exciting to be surprised https://www.juliabloggers.com/random-based-indexing-for-arrays/ https://www.juliabloggers.com/random-based-indexing-for-arra...
- zelphirkalt 5y agoGNU Guile can do that easily, as probably many other languages. The ecosystem is what makes people stick to Python, especially in areas like data science. Ecosystems are generally difficult to compete with, because they rely a lot on mind share. Mind share is a bit like gravity, in that clumps of matter will collect more matter. It takes very motivated people to implement solutions anew in another language, piece by piece getting an ecosystem up to speed. Or a lot of money.
- IshKebab 5y agoGNU Guile is a weird Lisp variant. Nobody is switching from Python to that; be realistic. I do agree in some applications like data science / machine learning you could never get people to switch from Python because everyone uses it. But Python is also used for loads of other things, e.g. hacky build systems, web scraping, etc. that could easily switch.
- zelphirkalt 5y agoIt is actually more precisely a Scheme dialect. I used Racket for some time and then moved to Guile. I do not find it weird, having used other lispy languages before. Guile has many useful tools, like OS level threads and also a fibers library, community projects, a good manual, albeit sometimes lacking a few examples, an active community and mailing list and more. Since it is a Scheme, it adheres to a Scheme standard, which specifies many things already. Then it implements many SRFIs, which also specify many things. I guess, that you name something that goes beyond the Scheme standard and beyond the SRFIs "weird". Could you point out what more specifically you personally find weird about it?
- oblio 5y agoLisp has been around for 60 years. Its adoption is lower than Cobol's or Fortran's and definitely lower than that of modern languages. Despite multiple commercial pushes over the decades. That's what's weird.
- 5y ago
- _Wintermute 5y agonim is the closest I've found. Really hoping it gains more traction.
- fouronnes3 5y agoPython type checking has entered a serious xkcd 927 phase that will get worse before it gets better.
- short_sells_poo 5y agoI'd posit you are being optimistic there. Just look at the python packaging story. It had 20 years to get better and it's still only getting worse.
- short_sells_poo 5y agoIt's starting to look like the huge embarrassment that is python packaging and environment management. I work with the language every day, and I still have no idea what am I supposed to use between conda, pip, setuptools/setup.py, pyproject, meta.yml, poetry, pipenv, etc... Conda is so slow that I sometimes wonder if we are being trolled by some cruel God of programming. Pip is faster, but version resolution is iffy. Hell, even just assigning versions to python packages is nothing short of ridiculous. Do you use version.txt in the root folder and set it manually? Do you have it set from SCM? Which of the half a dozen packages do you use to have it set from SCM? setuptools_scm? Versioneer? There are a set of tools in the python ecosystem that have basically no equal in any other language and these tools and the surrounding mindshare make python irreplaceable in the near term. The language itself is easy to learn and powerful enough to be able to do data analysis with ease. Good python code is easy on the eyes, which I personally consider an important aspect. Outside of these tools, core parts of the ecosystem are basically an XKCD joke. I tried switching to Julia as I find both the language and the ecosystem are vastly superior in their foundations. Unfortunately the maturity is not there yet, and neither is the mindshare. If I had to bet my career on adopting the language in a business setting, I'd not be prepared to do so. Which is a shame, because the situation turns into a Catch-22.
- alexgrover 5y agoStarting to? The Python ecosystem has been pretty behind other languages for more like 10 years now. I'm still forced to use it for work but it's becoming more and more likely that "no python" will be a hard requirement for my next job search... What tools do you find irreplaceable?
- Demiurge 5y agoThere are actually clear answers to all your questions. All the tools you listed do different things, except maybe poetry and pipenv, so you can pick whichever one you like, you're not supposed to do anything. You can have choice, illusion of free will, etc... As to module version, there is a standard on how to define it in __version__: https://www.python.org/dev/peps/pep-0008/#module-level-dunder-names https://www.python.org/dev/peps/pep-0008/#module-level-dunde...
- Demiurge 5y ago... is there some problem with having multiple choices of libraries?
- whimsicalism 5y agoI think it'd be nice if they settled on a standard as to what is a correctly typed program. Mypy and Pyre are pretty similar, but Pytype has very different standards.
- Demiurge 5y agoIf type analysis tools show different issues, fixing one should not break the other, unless the other is wrong? They both are trying to model the same language/runtime.