4 ms·
Strings cannot be used within interpolated expressions; e.g. this will cause a straightforward parse exception This ought to be pretty straightforward to fix b
by pmjordan 17y ago
Strings cannot be used within interpolated expressions; e.g. this will cause a straightforward parse exception
This ought to be pretty straightforward to fix by escaping the quotes via \"
- cemerick 17y agoSure, but that's not what you'd like to have happen in the end (though it works in a pinch). I mentioned it because it was one of the issues that is insurmountable from userland right now.
- anonjon 17y agoYou could just pick a different delimiter for strings within the interpolated string, and do a string-replace-all with \" before parsing. (although then you have to find delimiters that aren't used in the language normally, possibly the | or something).
- francoisdevlin 17y agocemerick, I've hacked both Ruby & Clojure, so I can comment on the way Ruby handles stings. Ruby has a concept of a 'string', as opposed to a "string". 'This is strict input, no escapes' "This is input with escapes" I think that the suggested \" method is the best solution in Clojure.