Preallocation, Broadcasting, Overloading #400
Replies: 1 comment
-
Hi @goyalyashpal thanks for your interest! Indeed, Mojo already supports function overloading, which is the language feature on your list. I'm definitely a fan of pattern matching, and Python has this as well - we just haven't gotten it high enough in the priority list to implement. The others are aspects of library design - in Mojo, things like broadcasting and allocation are deferred to library authors rather being hard coded into the compiler. This allows different domains to make different tradeoffs that make sense for them. I'm going to close this out because we're too early to design specific libraries and the other features are tracked on the roadmap etc, thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi!
Thanks a lot for (trying to) bringing choice of type flexibility (static/dynamic) and choice of memory ownership (immutable
borrowed
or mutableinout
) to python.py
.There are
twothree sort of generic (as in loosely defined in implementation) features from (julia, haskell) which i think can be helpful for mojo given its target for performance and AI.None
,undefined
orNull
types"Use array (element-wise) operations instead of list comprehensions."
Think C++ type-decorated or mangled names
Examples:
broadcasting/vectorizing operator
.
in Juliaref: cheats.quantecon, cheat.julia
Additional:
Examples:
Beta Was this translation helpful? Give feedback.
All reactions