@monte: Am I allowed to say 'blech!'?
The tagged mode was there to emulate the PHP-style web site coding practice where code and templates were intertwined. It's certainly a method of coding, but perhaps one which is becoming increasingly less common with all the higher-level web frameworks which have appeared over the last few years thus I'd be concerned about complicating the core language syntax (and the tools that have to process it) to add something which at the moment I'm unclear as to the utility.
Whilst multi-line string constants could be useful in certain instances, I'd prefer we look more deeply into how they might be used and whether there are 'better' abstractions for dealing with those cases. One key problem with multi-line constants is the parsing of them, and ensuring they can actually be used for any string. In this case, for example, you wouldn't be able to have a substring in the text which is '<?lc'. This might sound a bit like nit-picking, but other languages which do have multi-line constants do so in a way so you can choose the terminator - precisely so that there is never any problem in that regard. (Although they all have the problem of being syntactically ugly - but perhaps that isn't something one can do much about).
Actually I wonder whether it needs to be a general 'token' (which could be used anywhere), or whether it could be restricted to some sort of 'nice' constant syntactic block clause - i.e. the ability to declare a string constant over multiple lines which you can then reference as you would any other constant:
Code: Select all
multiline constant kMyLongConstant terminated by "FOOBAR"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque volutpat,
velit sit amet ultricies pretium, mi felis euismod ligula, ut fringilla lorem felis
in nulla. Proin eleifend dapibus convallis. Curabitur in tortor in dolor hendrerit
blandit id vel diam. Donec vehicula vehicula imperdiet. Nam porta ut dolor eu
feugiat. Integer quis feugiat leo. Proin pellentesque augue eu malesuada
fermentum. Nunc vitae euismod justo, id vulputate mauris. Phasellus tincidunt
enim nulla, vel mattis quam finibus at. Nunc cursus arcu ultricies rutrum
elementum.FOOBAR
end constant
Here the terminated clause is only really needed if none of the lines of your constant start with "end constant".
There are other things to consider here too though - for example indentation and editing in the script editor... I think it is important that any feature such as this still allows nicely formatted readable script.