3 ms·
This looks amazing. I’ve been hoping for something like this to come out for awhile. With the recent wave of Python type hinting I always felt like it should be
by LionTamer 4y ago
This looks amazing. I’ve been hoping for something like this to come out for awhile. With the recent wave of Python type hinting I always felt like it should be possible to compile type hinted Python
- bamboozled 4y agoI also wonder why people don't just use a language which is statically typed if that's something they actually want / need?
- coderenegade 4y agoPython has better libraries and faster turnaround. It would be handy if you could write something without using type hints as a quick prototype, and then add them in for a performant releasable product. It would also help with distribution of python code (distribute the binary), which isn't as strong as python's other features.
- bamboozled 4y agoSometimes I wonder if people who say this have tried something like Go? The way I think about it is like this, if you want to really just hack something together, why do you care about static typing? If you're building a serious larger code base, you then might want static typing, so then why not use a statically typed language?
- adsharma 4y agoBecause python is #2 on the most used languages list, has great tooling, IDE support, has been around for 30+ years. It's been used to build serious large scale projects. The idea is that you can get great runtime performance by transpiling. This is how Facebook worked till 2013-2014 (php -> C++ transpiler). It's unfortunate that google abandoned the grumpy project. But many good alternatives around.
- bamboozled 4y agoThere are reasons it's #2 on that list, because there's a lot of shit python code out there. Not all of it is Instagram (Django). Probably the most atrocious code I've ever seen has been PHP followed by Python. I use Python personally, I just don't think it's a good choice if you really want a statically typed language...because it's not statically typed.
- LionTamer 4y agoGo looks very promising, particularly for web services / networking oriented programs. I don’t have much experience / knowledge about Go, does it have a comparable ability to write the kind of expressive, elegant code that Python can with its list/dict comprehensions, operator overloading, generators, etc.
- yoro46 4y agoThere's no need to paint typing as a black and white picture. Basically all of the major Common Lisp implementations are compiled yet allow for typing in order to let the compiler emit better machine code (e.g. the compiler doesn't need to insert runtime type checks or use generic arithmetic when adding two u16s and storing the result in a u32). It's nice being able to use dynamic types for prototyping then gradually adding types later for better optimization by the compiler.
- LionTamer 4y agoThat’s completely valid. I do the bulk of my work in my current internship in Machine Learning & Data Science codebases and there is no other language which has anything close to the ecosystem of libraries/tooling that Python has in this domain while also being a suitable general purpose programming language. I don’t have much experience with Matlab/Mathematica but I hear Matlab is decent for Machine Learning - but I don’t want to have vendor lock-in. That leaves me with C++ or Julia. C++ is not the most ergonomic language and adding manual memory management isn’t an ideal. Julia looked promising and I have heavily considered taking a deep dive, but ended up being deterred [0] - I feel like these are pretty major problems to exist for a language of this point in maturity. [0] https://yuri.is/not-julia/ https://yuri.is/not-julia/
- adsharma 4y agoTry py2many may be? 7-8 supported target languages, although it began with c++14 as the py14 project.