Re: Pike 8.0 RC1

"Stephen R. van den Berg" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Zenothing wrote:
>o Added new syntax for literal-string constants

>  #{, #( and #[ starts a literal string, and it is ended by the corresponding
>  end marker: #}, #) and #] respectively.

I agree that it's a pity that this way you only have three fixed ones.
SQL solved this differently.

I'd indeed suggest that the SQL way is more elegant.  It would amount
to something like the following Pike equivalent:

#{ is terminated by #}
#abc{ is terminated by #abc}

etc.  All other rules stay the same.  It will support unlimited nesting.
Supporting #( and #[ as well is in a similar manner of course is possible.

>o Added the '?:' operator for compatibility with other C-like languages. It
>is identical to '||' in pike.

I guess a?:b is shorthand for a?a:b.  I'm curious though, which languages
already have it?  I tried to google for it, but that turnes out to be
difficult.
-- 
Stephen.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.