develooper Front page | perl.perl6.language | Postings from October 2005

Re: new sigil

From:
Darren Duncan
Date:
October 20, 2005 16:02
Subject:
Re: new sigil
Message ID:
p06230900bf7dc72e3f82@[192.168.1.101]
Speaking briefly, Unicode is the way of the 
future, and even many modern systems have strong 
support for it.  Perl 6 is a language of the 
future plus present, not of the past, and 
shouldn't be limited by things that are only 
issues for older systems while even then being 
easy to work-around on them.

I say that we should exploit all the Unicode 
characters reasonably possible to make for a more 
elegant language, and any tools currently behind 
will catch up before long.

In this case, I support the use of any 
international currency symbol for use as Perl 
sigils and/or operators as appropriate.  Eg, we 
already use $ (dollar; unicode=0024; utf8=24) and 
¥ (yen; unicode=00A5; utf8=C2A5), and I suggest 
that the next best one to exploit is ¤ (euro; 
unicode=20AC; utf8=E282AC), and the next best is 
£ (pound; unicode=00A3; utf8=C2A3).  In my 
experience, the ¢ (cent; unicode=00A3; utf8=C2A3) 
is no harder to type than either of those.

In some cases, typing a ¢ is easier than most of 
those characters.  On a Macintosh keyboard, 
typing opt-4 will get a ¢ as shift-4 gets a $. 
For that matter, Macintosh keyboards and their 
'option' key allows one to type twice as many 
characters without entering special codes or 
using an input palette as other keyboards having 
only a 'shift' key do.  So in that respect, if 
you want a sigil that is meant to be discouraged 
due to being harder to type, then ¢ may be a 
worse choice than some other options.

On the other hand, if you want to use the ¢ due 
to its being conceptually tied to $, that they 
are different units of currency meant to be used 
together, then the ¢ is fine.

All this being said, if you explicitly want to 
have ASCII alternatives for all Unicode 
characters being used, then I suggest it is best 
to keep the use of Unicode characters mainly in 
operators, because those are always surrounded by 
whitespace and can easily be substituted for 
latin words.

Whereas, because sigils are always right next to 
ordinary word characters, I suggest that they 
should always be ASCII characters, or that the 
ASCII equivalent should not contain any word 
characters.  My impression is that sigils 
containing alphanumerics just look wrong.

Perhaps a solution here for an ASCII equivalent 
is something combining the $ and something else. 
How about this twigil, which combines '::' and 
'$':

   :$:

Does that conflict with anything?

-- Darren Duncan



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