4 ms·
It just occurred to me how much easier certain text-operations (like syntax highlighting, regular expressions and other parsers) if we consistently used the rig
by treve 9y ago
It just occurred to me how much easier certain text-operations (like syntax highlighting, regular expressions and other parsers) if we consistently used the right unicode symbols for quotes and apostrophes
- mbrock 9y agoThe only languages I know off the top of my head that use balanced delimiters for strings are M4 and Perl 6. Hey, imagine being able to nest strings without escaping! What a concept!
- chaosfox 9y agoPerl does that as well, and you can even choose the delimiters you wanna use: > For the constructs except here-docs, single characters are used as starting and ending delimiters. If the starting delimiter is an opening punctuation (that is (, [, {, or < ), the ending delimiter is the corresponding closing punctuation (that is ), ], }, or >). If the starting delimiter is an unpaired character like / or a closing punctuation, the ending delimiter is the same as the starting delimiter. Therefore a / terminates a qq// construct, while a ] terminates both qq[] and qq]] constructs.
- jstimpfle 9y agoNot a language, but I adopted this concept as well: http://jstimpfle.de/projects/wsl/main.html http://jstimpfle.de/projects/wsl/main.html And I guess you could count HTML in, too.
- stevelosh 9y agoCommon Lisp doesn't have it built in, but the cl-interpol library adds this (and you can add your own custom delimiters too). http://weitz.de/cl-interpol/#syntax http://weitz.de/cl-interpol/#syntax
- kazinator 9y agoPostScript! It uses (...) for strings. Nesting string literals without escaping is a somewhat poor concept, though. Firstly, what does that even mean? Given `abc `def' ghi', what is the string here? Is it abc def ghi or is it abc `def' ghi? Secondly, what if I want to just have an unbalanced ` character in the string data?
- psadauskas 9y agoAnd every time I get in an argument with a poorly-escaped CSV file, I wish we had just used ASCII 28-31 as delimiters. (File, Group, Record and Unit Separator)