-
Notifications
You must be signed in to change notification settings - Fork 2
RFC: Arrays #10
Comments
@Qix- func foo([Int32] fish): Int {} Incasing the type could be easier than parsing the variable name in a C++ style syntax: int foobar[]; I say "could be easier" because then the compiler deduces the "type" as an array in place of the variable name, and because the variable is assigned to the given type, all the compiler would have to is draw var name to type (which would be defined as an array). Could be faster? Definitely would require testing. |
Yep that's how I plan to do it. Just gotta get around to writing the RFC out.
|
@PolyGN maybe you have some ideas about this. One of Arua's goals is to be very compatible with C-family code without making sacrifices. One of the ideas I had was to use the concept of negative pointer offsets as metadata information, reducing Arua supports syntax such as
This would allow for configurable dynamic bounds checking as well as increased performance for This, however, limits arrays to a specific length and guarantees an overhead of at least The tradeoffs are very debatable. Anyway, the idea is that an array is allocated ( Plus, Arua code that must call into C can simply pass the array and tl;dr With negative pointers for metadata, we remove Hopefully that made sense. |
TODOThe text was updated successfully, but these errors were encountered: