M
Modular12mo ago
jmky

Const generics, a runtime or compile time construct?

https://docs.modular.com/mojo/changelog.html#v0.4.0-2023-10-05 Really happy to see this development in Mojo, where StringLiteral is a const generic of type 'string', which is something not even C++ or Rust manages to do. However, I am curious if the 'instantiation' or 'specialization' of the template parameter is actually resolved during runtime or compile time. I am asking because I am waiting to be able to check the length of an input ListLiteral at compile time and do comparison with it. https://github.com/jymchng/funjo/blob/master/src/array/array.mojo#L27 #mojo
Modular Docs - Mojo🔥 changelog
A history of significant Mojo changes.
GitHub
funjo/src/array/array.mojo at master · jymchng/funjo
Having fun with Mojo, the latest low-level, system programming language developed by Modular. - jymchng/funjo
1 Reply
jmky
jmky12mo ago
@Jack Clayton Any answer?
Want results from more Discord servers?
Add your server