develooper Front page | perl.perl5.porters | Postings from August 2010

Re: Any opposition still to the idea of syntax indicating defaultregex modifiers?

Thread Previous | Thread Next
From:
Zefram
Date:
August 11, 2010 02:03
Subject:
Re: Any opposition still to the idea of syntax indicating defaultregex modifiers?
Message ID:
20100811090321.GE1095@lake.fysh.org
karl williamson wrote:
>If there's no opposition, we need to settle on what is the syntax is.  
>Ben originally proposed (?~  I thought (?.  was better because the tilde  
>can be too easily confused with a hyphen, (?-  which is also legal right  
>after the question mark.

I think this structure, with one extra char between the "?" and the flags,
is ideal.  Either tilde or dot is fine by me, and I'm not at all worried
about getting ASCII chars confused with each other.  Confusability is
a Unicode disease.

The following chars already have a meaning immediately after "(?" in
a regexp (some of them more than one, depending on following chars):

	! # & ' ( ) + - 
	0 1 2 3 4 5 6 7 8 9
	: < = > ?
	R
	i m p s x
	{ |

Earmarking all remaining letters for use by future flags, the remaining
available punctuation characters are:

	" $ % * , . /
	;
	@
	[ \ ] ^ _
	`
	} ~

A few of those would interact badly with quoting syntax.  I'd be happy
with us using any of the others.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About