Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Println is also much more complicated and expensive at runtime in "any other language"


Are you sure? Java's println is pretty well optimized especially with the recent string builder optimizations.


Except for C++.


You mean the language which, in every major implementation, that particular function is a macro?


None of printf, iostreams, or std::fmt are macros in any implementation I'm aware of.


va_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.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: