Re: Turtle quotation idea unicode

On 24 Feb 2012, at 20:23, Gavin Carothers wrote:

> On Fri, Feb 24, 2012 at 7:11 AM, Henry Story <henry.story@bblfish.net> wrote:
>> This is something I was thinking would be useful in Scala
>> for regexps for example, where having to decode the number of backslashes makes a nice notation
>> unreadable

I just discovered that Scala does in fact work the way I was thinking it should.
One cannot escape a " in a """ string for example. have this in fact. when one uses """ one can't use escape's the same way.

From the Book "Programming in Scala 2nd edition"

[[
Because this syntax is awkward for strings that contain a lot of escape sequences or strings that span multiple lines, Scala includes a special syntax for raw strings. You start and end a raw string with three double quotation marks in a row ("""). The interior of a raw string may contain any characters whatsoever, including newlines, quotation marks, and special characters, ex- cept of course three quotes in a row. For example, the following program prints out a message using a raw string:
]] 

> 
> I think what your asking for are something like r"" strings in Python.
> A string  which is designed for including lots of \s ie, used for
> regexps .
> 
> Turtle is not a programming language. A new literal syntax simply to
> reduce the need to escape \s does not seem like a small change nor a
> widely needed one. I'd be happy to be convinced otherwise. If we do
> chose to add a new string literal syntax I would recommend NOT using
> an existing production (which would change the meaning of existing
> Turtle files) and using r"" or another prefix.

This is just a thought that occurred to me programming a Turtle parser. It feels
like there is a lot of infrastructure to work with tools that can't deal with unicode, but
little for people who do have unicode tools ready. My point is that what is simple has shifted.
10 years ago \u4343 was vital. Now it may create more complexity than needed.

One can see this shift with the way Java type languages are transforming into Scala type 
langugages.

	Henry


> 
> --Gavin

Social Web Architect
http://bblfish.net/

Received on Friday, 24 February 2012 19:37:31 UTC