3 ms·
Yeah, Java is pretty fast despite the fact that it still has these kinds of obviously suboptimal things going on. I love how Zig, D and Rust do exactly what yo
by brabel 7mo ago
Yeah, Java is pretty fast despite the fact that it still has these kinds of obviously suboptimal things going on.
I love how Zig, D and Rust do exactly what you say: parse the format string at compile time, making it super efficient at runtime (no parsing, no regex, just the optimal code to get the string you need).
I say this but I write most of my code in Java/Kotlin :D . I just wish I could write more low-level languages for super efficient code, but for what I do, Java is more than enough.
- jandrewrogers 7mo ago> Zig, D and Rust Also C++, which works the same way.
- arikrahman 7mo agoI admire Rich Hickey's approach of building on top of the Java ecosystem for this reason, adding a functional first approach with emphasis on data structures, where using the right algorithms comes naturally.
- mike_hearn 7mo agoKotlin string interpolation turns into the fancy invokedynamic based string concatenation behind the scenes so it's very optimized: https://openjdk.org/jeps/280 https://openjdk.org/jeps/280