4 ms·
Println is also much more complicated and expensive at runtime in "any other language"
by nightfly 3y ago
Println is also much more complicated and expensive
at runtime in "any other language"
- alphanullmeric 3y agoExcept for C++.
- pie_flavor 3y agoYou mean the language which, in every major implementation, that particular function is a macro?
- plorkyeran 3y agoNone of printf, iostreams, or std::fmt are macros in any implementation I'm aware of.
- pie_flavor 3y agova_arg, which drives printf, is what I was referring to, and is generally a macro, and printf is what I was assuming alphanullmeric was referring to. iostreams defeat the point, since Rust is just as capable of the functionality and indeed the exact syntax, and std::format uses the properties of templates that are exactly like macros in both benefits and drawbacks, templates being an unusual cross between macros and generics.
- alphanullmeric 3y agoWhat macro? https://en.cppreference.com/w/cpp/io/print https://en.cppreference.com/w/cpp/io/print
- nvm0n2 3y agoAre you sure? Java's println is pretty well optimized especially with the recent string builder optimizations.