2 ms·
I'd recommend taking inspiration from Nim, which uses some really clever metaprogramming techniques to allow for very terse representation of code. Idiomatic P
by whytevuhuni 3y ago
I'd recommend taking inspiration from Nim, which uses some really clever metaprogramming techniques to allow for very terse representation of code.
Idiomatic Python is the way it is due to having really good defaults, but in order to achieve the speed of Rust, you often have to go against them. Metaprogramming allows for optimization of code by having a function examine another function, and changing the defaults in use to suit its particular use-case.
See also Mojo, which adds some C or Rust-like concepts to Python.