separator character?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

separator character?

Sophie424
Does Squeak allow any character other than 0-9a-zA-Z: in a message name? I
want to exploit some naming patterns and could make good use of a separator
character.

Thanks,

Sophie




Reply | Threaded
Open this post in threaded view
|

Re: separator character?

keith1y
itsme213 wrote:
> Does Squeak allow any character other than 0-9a-zA-Z: in a message name? I
> want to exploit some naming patterns and could make good use of a separator
> character.
>
> Thanks,
>
> Sophie
I think that there are hacks available to enable $_ to be used in
message Selectors.
I have also discovered that $˚  works as a separator.

Keith

Reply | Threaded
Open this post in threaded view
|

Re: separator character?

Hans-Martin Mosner
In reply to this post by Sophie424
itsme213 schrieb:
> Does Squeak allow any character other than 0-9a-zA-Z: in a message name? I
> want to exploit some naming patterns and could make good use of a separator
> character.
>  
At the moment, no.
Smalltalk mostly uses the "CamelCase" convention. The underscore
character _ used in many other programming languages had been used for
the assignment operation (being displayed as a left arrow in the
original Smalltalk-80 fonts).
Squeak still support using _ as assignment and thus can't use it in
identifiers. Other Smalltalk implementations have been using := for
assignment either from the beginning (such as VAST) or after some years
of customers nagging (such as VW :-) ).
There have been discussions on the Squeak mailing list, but at the
moment it does not seem to be planned for the near future.
Personally, I would like to have _ available in identifiers.

Cheers,
Hans-Martin

Reply | Threaded
Open this post in threaded view
|

Re: separator character?

Klaus D. Witzel
In reply to this post by Sophie424
On Thu, 10 Jan 2008 08:45:09 +0100, itsme213 wrote:

> Does Squeak allow any character other than 0-9a-zA-Z: in a message name?  
> I
> want to exploit some naming patterns and could make good use of a  
> separator
> character.

You can find out the characters which can start and/or can be part of a  
name in Scanner>>#initialize :)

/Klaus

> Thanks,
>
> Sophie
>
>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: separator character?

Zulq Alam-2
In reply to this post by Hans-Martin Mosner
With Glorp installed you can use underscore for all but the first character.

Zulq.

Hans-Martin Mosner wrote:

> itsme213 schrieb:
>> Does Squeak allow any character other than 0-9a-zA-Z: in a message name? I
>> want to exploit some naming patterns and could make good use of a separator
>> character.
>>  
> At the moment, no.
> Smalltalk mostly uses the "CamelCase" convention. The underscore
> character _ used in many other programming languages had been used for
> the assignment operation (being displayed as a left arrow in the
> original Smalltalk-80 fonts).
> Squeak still support using _ as assignment and thus can't use it in
> identifiers. Other Smalltalk implementations have been using := for
> assignment either from the beginning (such as VAST) or after some years
> of customers nagging (such as VW :-) ).
> There have been discussions on the Squeak mailing list, but at the
> moment it does not seem to be planned for the near future.
> Personally, I would like to have _ available in identifiers.
>
> Cheers,
> Hans-Martin
>
>


Reply | Threaded
Open this post in threaded view
|

Re: separator character?

Yoshiki Ohshima-2
In reply to this post by Sophie424
> Does Squeak allow any character other than 0-9a-zA-Z: in a message name? I
> want to exploit some naming patterns and could make good use of a separator
> character.

  Sure it does.  For example, U+3000 (Ideographic space) is no
different from other characters that "can be the initial of global"
*and* also "can be the initial of locals".

  So the attached pictures shows a class in Japanese Hiragana
characters with space and a method name with space.

  There are many other obscure symbols and characters so you can
probably pick one.

-- Yoshiki



ai.png (29K) Download Attachment