By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,442 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,442 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

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?
Jul 18 '05 #1
Share this Question
Share on Google+
29 Replies


P: n/a
Mark Hahn wrote:
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?


Belgian azerty: no problem. Easier to type, in fact, than several other
symbols that are frequently used while programming, e.g. []{}_.

--
"Codito ergo sum"
Roel Schroeven
Jul 18 '05 #2

P: n/a
LB

"
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?

$ is a shift-key on italian standard keyboard.

LB
Jul 18 '05 #3

P: n/a
Mark Hahn wrote:
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?


Finnish/Swedish keyboards: No problems (AltGr + 4)

-Petter-
Jul 18 '05 #4

P: n/a
LB wrote:
$ is a shift-key on italian standard keyboard.


Also on german standard keyboard.

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplusr.de
-------------------------------------------------------------------
Jul 18 '05 #5

P: n/a
On Tue, 20 Apr 2004 10:04:35 +0200, Peter Maas <pe********@mplusr.de> wrote:
LB wrote:
$ is a shift-key on italian standard keyboard.


Also on german standard keyboard.


Just as on the Japanese notebook in front of me.

Hans-Peter Schröcker
Jul 18 '05 #6

P: n/a
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.

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?


In Germany every serious programmer has to switch to the American layout
anyway because of {}[]@\~| (all odd AltGr combinations). As this is no
problem on Windows and Linux(KDE) (how about the Mac?), I recommend against
making special character choices based on keyboard layout.

Apart from that obj$func() hurts my eye more than obj->func() and
obj!func(). As always, Python shines here with its obj.func() :-)

Peter
Jul 18 '05 #7

P: n/a
In article <c6*************@news.t-online.com>, Peter Otten wrote:
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

<snip>
Apart from that obj$func() hurts my eye more than obj->func() and
obj!func(). As always, Python shines here with its obj.func() :-)


I believe the suggestion is "$.func()" instead of "self.func()" (the
Python way) or just ".func()" (the earlier Prothon way). Or possibly
the suggestion is for "$func()", although I like $.func() much better.

(I like this better than the ., though I still have no problem with
writing self all the time, so I prefer sticking to the Python way. It
solves my main problem with ., which is when you do have to pass self
explicitly. "function_call(param1, ., parm2)" is much more confusing
than "function_call(param1, $, param2)".)

Joe
Jul 18 '05 #8

P: n/a
On Mon, 19 Apr 2004 23:22:10 -0700
"Mark Hahn" <ma**@prothon.org> wrote:
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


Anyone who writes a language like Perl or PHP would use it a lot anyway (all variables start with a symbol, usually $)

--
Hugh Macdonald
The Moving Picture Company

Jul 18 '05 #9

P: n/a
Joe Mason wrote:
In article <c6*************@news.t-online.com>, Peter Otten wrote:
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

<snip>
Apart from that obj$func() hurts my eye more than obj->func() and
obj!func(). As always, Python shines here with its obj.func() :-)


I believe the suggestion is "$.func()" instead of "self.func()" (the
Python way) or just ".func()" (the earlier Prothon way). Or possibly
the suggestion is for "$func()", although I like $.func() much better.


I skimmed too lightly over the first paragraph and missed that - but still
there is the obj$func() example in Mark's post, and with my Python mindset
(I didn't follow the Prothon discussion closely) I cannot figure out what
that is supposed to mean.
(I like this better than the ., though I still have no problem with
writing self all the time, so I prefer sticking to the Python way. It
solves my main problem with ., which is when you do have to pass self
explicitly. "function_call(param1, ., parm2)" is much more confusing
than "function_call(param1, $, param2)".)


[OT] Seems to happen all the time with Python - try to simplify at some
point and you pay twice elsewhere. Prothon will have a hard time occupying
a local optimum in beauty/simplicity/usefulness that is both near and
better than Python. This starts with the name, by the way - it evokes the
association of prothotype, which looks quite, er, ungreek :-)

Peter

Jul 18 '05 #10

P: n/a
Hello Mark,
IMO typing dollar($) sign should not be a problem in Sweden and Germany.

Regards,
Srijit

"Mark Hahn" <ma**@prothon.org> wrote in message news:<mk3hc.13895$dZ1.10823@fed1read04>...
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.

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?

Jul 18 '05 #11

P: n/a
Peter Otten wrote:
In Germany every serious programmer has to switch to the American
layout anyway because of {}[]@\~| (all odd AltGr combinations).


Oh, I didn't know that. Fortunately I'm not a serious programmer. ;)

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplusr.de
-------------------------------------------------------------------
Jul 18 '05 #12

P: n/a
El Mar 20 Abr 2004 03:22, Mark Hahn escribió:
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.

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?


Spanish and Latin American QUERTY keyboards: Shift + 4.
--
Adriano Varoli Piazza
The Inside Out: http://moranar.com.ar
ICQ: 4410132
MSN: ad*******@hotmail.com
Claves gpg / pgp en hkp://subkeys.pgp.net

Jul 18 '05 #13

P: n/a
Peter Maas wrote:
Peter Otten wrote:
In Germany every serious programmer has to switch to the American
> layout anyway because of {}[]@\~| (all odd AltGr combinations).


Oh, I didn't know that. Fortunately I'm not a serious programmer. ;)


I hate people being apodictic - even myself.
But I never felt comfortable with AltGr, so it was a great relief when I
learned about switching kezboard lazouts and well worth the occasional y-z
glitch. By the way, I once came across a whole book that had these
characters swapped.

Maybe my fingers just didn't grow in the right place to press AltGr+9
simultaneously, but somehow I can't see how that makes me the member of a
minority.

Mit freundlichen Gr[-en :-)

Peter
Jul 18 '05 #14

P: n/a
"Mark Hahn" <ma**@prothon.org> writes:
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 dollar sign is used in extensively in Unix shells and Perl, which
are both widely used (Perl also on Windows). It seems unlikely that
any keyboard with a latin alphabet wouldn't include it.

Des
types in a wide variety of dollar-equipped iso encodings.
--
"[T]he structural trend in linguistics which took root with the
International Congresses of the twenties and early thirties [...] had
close and effective connections with phenomenology in its Husserlian
and Hegelian versions." -- Roman Jakobson
Jul 18 '05 #15

P: n/a
Mark Hahn wrote:¨
We are considering switching to the dollar sign ($) for self, instead of the
period ( . ) we are using now in Prothon.


any reason you cannot set up a mailing list for your little pet
project? you're generating tons of off-topic traffic, and frankly,
I don't think I'm the only one who couldn't care less about your
pre-alpha hack with minimum capabilities.

(if I posted hundreds of messages for every pre-alpha hack I've
ever made, people would quickly label me as an annoying crack-
pot.)

</F>


Jul 18 '05 #16

P: n/a
In article <ma**************************************@python.o rg>, Fredrik Lundh wrote:
Mark Hahn wrote:¨
We are considering switching to the dollar sign ($) for self, instead of the
period ( . ) we are using now in Prothon.


any reason you cannot set up a mailing list for your little pet
project? you're generating tons of off-topic traffic, and frankly,
I don't think I'm the only one who couldn't care less about your
pre-alpha hack with minimum capabilities.


There is a mailing list, it's got tons of traffic, and I think Mark's
being pretty judicious in what he posts here.

Joe
Jul 18 '05 #17

P: n/a
In article <c6*************@news.t-online.com>, Peter Otten wrote:
Apart from that obj$func() hurts my eye more than obj->func() and
obj!func(). As always, Python shines here with its obj.func() :-)


I believe the suggestion is "$.func()" instead of "self.func()" (the
Python way) or just ".func()" (the earlier Prothon way). Or possibly
the suggestion is for "$func()", although I like $.func() much better.


I skimmed too lightly over the first paragraph and missed that - but still
there is the obj$func() example in Mark's post, and with my Python mindset
(I didn't follow the Prothon discussion closely) I cannot figure out what
that is supposed to mean.


Oops - I skimmed even more lightly than you did, cause I missed the
obj$func example entirely.

Joe
Jul 18 '05 #18

P: n/a
"Fredrik Lundh" <fr*****@pythonware.com> wrote ...
any reason you cannot set up a mailing list for your little pet
project? you're generating tons of off-topic traffic, and frankly,
I don't think I'm the only one who couldn't care less about your
pre-alpha hack with minimum capabilities.

(if I posted hundreds of messages for every pre-alpha hack I've
ever made, people would quickly label me as an annoying crack-
pot.)


Sorry if I annoy, but I've only posted a total of about 4 thread-starting
messages. The hundreds of messages have been replies.

We do have active Prothon mailing lists, but no international members yet,
which is why I asked this particular question here.

When I posted my first Prothon messages, I asked if I should stay away from
c.l.p. out of courtesy. I was specifically told to hang around here by
several of the top Pythoneers, because they view Prothon as a potential
learning ground, or sandbox, for Python. So I will do so until those same
top Pythoneers tell me I have worn out my welcome, thank you very much.
Jul 18 '05 #19

P: n/a

"Peter Otten" <__*******@web.de> wrote ...
Apart from that obj$func() hurts my eye more than obj->func() and
obj!func(). As always, Python shines here with its obj.func() :-)


I believe the suggestion is "$.func()" instead of "self.func()" (the
Python way) or just ".func()" (the earlier Prothon way). Or possibly
the suggestion is for "$func()", although I like $.func() much better.


I guess I should outline my whole proposal for $ in Prothon. I'll try to be
brief.

Statement of problem:

# in python

class klass:
def __init__(self):
self.me = 1
def func(self):
print "func1,self"+str(self.me),

class klass2(klass):
def __init__(self):
self.me = 2
def func(self):
klass.func(self)
print "func2,self"+str(self.me),

inst = klass2()
inst.func() # prints func1,self2 func2,self2

#in Prothon

Klass = Object()
with Klass:
.me = 0
def .__init__():
.me = 1
def .func():
print "func1,self"+.me,

Klass2 = Klass()
with Klass2:
def .__init__():
.me = 2
def .func():
Klass.func() # does not do what python does
print "func2,self"+.me,

inst = Klass2()
inst.func() # prints func1,self0 func2,self2

As you can see, the call Klass.func() got the function func from the object
Klass and then called it on Klass using Klass as the target "self" instead
of the instance "inst". In Python the call klass.func was different because
Python knows that klass is a class and therefore obviously cannot be the
target of call (an instance), so it made the programmer pass the instance to
use as a parameter (something Prothon never does).

To fix this, we have to make things more explicit in Prothon. This is a
GOOD thing, making things more explicit. It makes things simpler. We have
four different proposals over on the Prothon mailing lists right now. I'll
show mine here right now briefly by just showing a bunch of sample code
lines:

$.var # $ replaces Python's self (think $elf)
$var # same thing (. is optional after $ self symbol)
obj.func() # get func from obj and bind to obj during call
obj$func() # get func from obj and bind to self during call
x = obj.func # get func from obj (simple attr retrieval)
bm = obj..func # get func from obj and make bound method from obj and func
bm = obj$$func # get func from obj and make bound method from self and func
with bobj: cobj$func() # get func from cobj and bind to bobj during call
with bobj: bm = cobj$$func # get func from cobj and make bound method from
bobj

Now we can fix the problem stated above using the example in the fourth line
above ( obj$func() ):

Klass = Object()
with Klass:
.me = 0
def .__init__():
.me = 1
def .func():
print "func1,self"+.me,

Klass2 = Klass()
with Klass2:
def .__init__():
.me = 2
def .func():
Klass$func() # ambiguity fixed
print "func2,self"+.me,

inst = Klass2()
inst.func() # prints func1,self2 func2,self2


Jul 18 '05 #20

P: n/a
Peter Otten wrote:
This starts with the name, by the way - it evokes the
association of prothotype, which looks quite, er, ungreek :-)


Indeed. It sounds more like an alien race that's
escaped from an upcoming StarCraft expansion pack...

Greg

Jul 18 '05 #21

P: n/a
"greg" <gr**@cosc.canterbury.ac.nz> wrote ...
Indeed. It sounds more like an alien race that's
escaped from an upcoming StarCraft expansion pack...


Yes, but a very advanced alien race :)
Jul 18 '05 #22

P: n/a

"Mark Hahn" <ma**@prothon.org> wrote ...
bm = obj..func # get func from obj and make bound method from obj and func bm = obj$$func # get func from obj and make bound method from self and

func

Don't look to close at the details of the proposal. People over at the
Prothon mailing list are shooting holes in it as I type. For example, the
brain-melting double periods and double dollar-signs are already history.
Jul 18 '05 #23

P: n/a
Mark Hahn wrote:

"Mark Hahn" <ma**@prothon.org> wrote ...
bm = obj..func # get func from obj and make bound method from obj and

func
bm = obj$$func # get func from obj and make bound method from self and

func

Don't look to close at the details of the proposal. People over at the
Prothon mailing list are shooting holes in it as I type. For example, the
brain-melting double periods and double dollar-signs are already history.


You seem to be both determined and open to critique - a good combination
IMHO.

Peer
Jul 18 '05 #24

P: n/a
Mark Hahn wrote:
Sorry if I annoy, but I've only posted a total of about 4 thread-starting
messages. The hundreds of messages have been replies.
when I posted my message, 25 of 48 messages visible in my newsreader
were Prothon-related. that's a lot of noise, for all those who read comp.
lang.python because they're interested in Python.
We do have active Prothon mailing lists, but no international members yet,
which is why I asked this particular question here.
if you're serious about doing user research among Python users, you can do a
lot better than posting sporadic questions to a newsgroup. only a small number
of all Python users reads comp.lang.python; only a small number of those that
read the newsgroup posts to it, and only a small number of those that posts are
contributing to your threads. you can get a lot better results and generate a lot
less noise by doing a web-based questionaire, and post a single invitation here
and in other forums where Pythoneers gather.
When I posted my first Prothon messages, I asked if I should stay away from
c.l.p. out of courtesy. I was specifically told to hang around here by
several of the top Pythoneers


strangely enough, I don't see any top Pythoneers contributing to the Prothon
threads. who are they?

</F>


Jul 18 '05 #25

P: n/a

"Peter Otten" <__*******@web.de> wrote in message
news:c6*************@news.t-online.com...

You seem to be both determined and open to critique - a good combination
IMHO.


Well, thank you very much. Why don't you come over and help? (Always
pitching the cause... :)
Jul 18 '05 #26

P: n/a

"Fredrik Lundh" <fr*****@pythonware.com> wrote in ...
you can get a lot better results and generate a lot
less noise by doing a web-based questionaire, and
post a single invitation here
and in other forums where Pythoneers gather.
That is a very good idea. I will do that in the future. Of course, people
will still start babbling on the list about the question anyway, but that I
can't control.
strangely enough, I don't see any top Pythoneers contributing to the Prothon threads. who are they?


Oh, you are calling my bluff, eh? <grin> I remember Tim Peters off the top
of my head, I'd have to go back through the archives to find the others. Do
you want urls of the archived messages <grin>?

Jul 18 '05 #27

P: n/a
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@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 :)
Jul 18 '05 #28

P: n/a

"Fredrik Lundh" <fr*****@pythonware.com> wrote ...
when I posted my message, 25 of 48 messages visible in my newsreader
were Prothon-related.


In my defense, who would have thought that asking if international keyboards
had trouble typing a dollar sign would be a troll question? I would never
had thought to make a web page questionaire for such an innocent sounding
question.

Do you think it's because I added "(prothon)" to the subject? I do that as
a courtesy but maybe it causes trolling.
Jul 18 '05 #29

P: n/a
Mark Hahn wrote:
In my defense, who would have thought that asking if international keyboards
had trouble typing a dollar sign would be a troll question?


I'd say it's more of a bike shed question, not a troll.

(if you don't know what I mean, google for "bike shed effect").

</F>

Jul 18 '05 #30

This discussion thread is closed

Replies have been disabled for this discussion.