3 ms·
The factorial test giving zero on majo suggests they aren't doing arbitrary precision integer arithmetic. I liked mojo as a python superset. Wanted to be able
by JonChesterfield 1y ago
The factorial test giving zero on majo suggests they aren't doing arbitrary precision integer arithmetic.
I liked mojo as a python superset. Wanted to be able to run arbitrary python through it and selectively change parts to use the new stuff.
A "pythonic language" sounds like that goal has been dropped, at which point the value prop is much less clear to me.
- bishabosha 1y agoThey explicitly casted it to an 'Int' on the mojo side, but the modular website claims that isnt a specific bit-width so i am surprised
- int_19h 1y agoIt's not a specific bitwidth in a sense that it maps to whatever largest integer type is natively supported by the target architecture (i.e. basically 32-bit or 64-bit).
- melodyogonna 1y agoFrom Chris Lattner on Modular discord few days ago: Yep, that's right. Int behaving like a machine integer is very important for systems performance. Leaving the "int" namespace untouched allows us to have a object-based bigint in the future for compatibility with python. As others have mentioned above, it is still a goal to be compatible with python in time, just not a short term priority
- mhh__ 1y ago[flagged]
- 0xpgm 1y agoYour comment is quite subjective, and Python's popularity both in teaching and in industry would suggest otherwise.
- mhh__ 1y agoTaste is subjective yes, very novel insight. Python is a hacky language that was never designed other than laying it's eggs against the grain of what we seem to mostly agree is godo — e.g. functional programming and composition. Big tech spends a lot of money to avoid python in critical infra.
- saagarjha 1y agoTaking unchanged Python and making it fast is basically impossible.
- fwip 1y agoSure - but you can support unchanged Python at regular Python speed, and also have extensions to the language that can be run at higher speed.
- eyegor 1y agoI guess they abandoned the python superset idea? I followed them for a bit when they first publicly launched and they said "don't worry, we'll be a real python superset soon" and the biggest omission was no support for classes. A few years later, it looks to be missing the same set of python features but added a lot of their own custom language features.
- hogepodge 1y agoI'd say less abandoned, and more deferred. It was highly aspirational goal, and practically speaking it's better right now to take inspiration from Python and have stronger integration hooks into the language (full disclosure, I work at Modular). We've specifically stopped using the "superset of Python" language to be more accurate about what the language is meant for right now.
- serial_dev 1y agoDeferred means it’s coming, but we don’t know if it will ever come. I’d bet it won’t.
- nickm12 1y agoBeing a Python superset and being fast are fundamentally in tension. It would be possible, maybe, to have a Python superset where you get the highest performance as long as you avoided the dynamic features of Python. However, I suspect it would make the user base grumpy to have a hidden performance cliff that suddenly showed up when you used dynamic features (or depended on code that did the same).
- pjmlp 1y agoThe dynamic features of Python are no different from the dynamic features of Smalltalk, Self, Common Lisp, but people have been educated to expect otherwise due to the adoption failure of dynamic compilers in Python community.
- markkitti 1y agoThe Python superset concept was always a gimmick. The goal was always to juxtapose Python with a language that superficially looks like Python in order for you to completely migrate from Python to Mojo. It is just providing a smooth ramp for you to do so in the same Apple migrated folks from Objective-C to Swift. Embrace. Extend. Extinguish.