Dollar sign ($) on foriegn keyboards? (prothon)

Tuure Laurinolli tuure at laurinolli.net
Wed Apr 21 14:47:37 EDT 2004


Mark Hahn wrote:
> We are considering switching to the dollar sign ($) for self, instead of the
> period ( . ) we are using now in Prothon.  Ruby uses the at-sign (@) for
> self, but our new usage of self also includes replacing the period for some
> attribute references, as in obj$func() versus obj.func(), and too many
> programs treat that as an email address and screw it up.  Also the S in the
> symbol $ reminds one of the S in $elf.

Personally I hate the use of $, @, £, # and & in any place where there 
are characters immediately on both sides of them. They don't visually 
break the word (unless they are highlighted by the editor, of course) 
and feel kludgy. & as prefix operator in C works pretty well because 
there usually is a space to it's left, and $ and @ as they are used in 
prefix role in perl work well enough (of course they are still damn 
ugly), but tucking wideand tall characters like that between words is 
IMO stupid.

Compare the following:
         a$b, a at b, a£b, a#b, a&b
         a,b, a.b, a-b, a_b, a!b, a¤b

Some characters like single qutoes could be used for operators like 
this, at least they would be visually pleasing:

obj'func()
obj´func()
obj`func()

or possibly other high-line characters

obj^func()
obj¨func()
obj~func()

Personally I like obj~func() and obj'func() most, and the use of ' as 
string quoting character only leaves ~, which I actually think would be 
pretty good.

> Can people from outside the U.S. tell me if typing the dollar sign often
> would be a problem in writing code?  Is it available and somewhat easy to
> type on international keyboards?

The typing is no problem up here in Finland, we have to use the whole 
numerical row together with AltGr anyway... You tend to learn to keep 
the right thumb on AltGr instead of space :)



More information about the Python-list mailing list