3 ms·
Adding new syntax to Java is tricky (unless certain other JVM languages starting with C ;) but I was really disappointed in the string proposal. At the very le
by beders 8y ago
Adding new syntax to Java is tricky (unless certain other JVM languages starting with C ;) but I was really disappointed in the string proposal.
At the very least, have a default, optional string substitution feature.
It ain't that hard and it's something users of raw strings will NEED anyways.
What good is it to have snippets of raw strings that then need to be parsed again and split and re-glued again?
JavaScript backticks are much more useful out of the box.
But that isn't the Java way... In Java, everyone gets to write their own string substitution library, littering the heap with completely unnecessary substrings.
After the disasters with generics and enums, do it right, for once, please?
- jfim 8y ago> unless certain other JVM languages starting with C Are you referring to Clojure or Ceylon? Or both, or neither?
- QuercusMax 8y agoKotlin?
- kvakil 8y agoI believe they're almost certainly referring to Clojure macros
- aardvark179 8y agoString substitution and raw string literals aren’t really that closely connected. I’d also suggest that if string substitution becomes nice it will get used far more, so it needs to be implemented in a way that constant folds things nicely. So if I had to guess it might get looked at after the work being done on constants.