On 8/10/2012 3:46 PM, bearophile wrote:
Walter's code seems to miss the point, but maybe he's trying to tell me
something about very small demo programs.
If you want something allocated on the stack, us a struct, not a class.
It's what structs are for.
You can also use templates with overloading to get stack allocated parametric
polymorphism and zero runtime overhead.
What I mean is:
1. If you write FORTRAN code in D, it will not work as well as writing FORTRAN
in FORTRAN.
2. If you write C code in D, it will not work as well as writing C in C.
3. If you write Rust code in D, it will not work as well as writing Rust in
Rust.
If you want D code to perform, you gotta write it in D. Not in Rust, C, or Java.