Of course. But there are some other things that are available. §, `, ? comes to mind. Phil On Wed, Sep 10, 2014 at 4:59 PM, Marcus Denker <marcus.denker@inria.fr> wrote:
On 10 Sep 2014, at 16:38, phil@highoctane.be wrote:
I was playing around with the idea of using stuff like in jQuery, where we do have the '$' function that would do a lot of things.
But one cannot create such elements as
SlotClassBuilder>>validateClassName "Validate the new class name. Raise warning if invalid."
name detect: [ :c | (c isAlphaNumeric or: [ c = $_ ]) not ] ifFound: [ :c | InvalidGlobalName signal: 'Invalid character: ''' , c printString , '''' for: name ]. name first canBeGlobalVarInitial ifFalse: [ InvalidGlobalName signal: 'Class name does not start with a valid Global Var Initial' for: name ]
doesn't let us.
Is there a reason for that (ok, we have $ for chars, and #, ... and other things but still).
The problem is that $ is part of the smalltalk grammar for symbols, $ can not be a variable name.
$asdasd
is parsed as a message send to the character a, for example.
Marcus