Fw: Squeak and CM (fwd)
Doug Way
dway at mat.net
Thu Jan 20 23:22:09 UTC 2000
On Thu, 20 Jan 2000, Stephan Rudlof wrote:
> Stephan Rudlof wrote:
> >
> > What do you think of enhancing readability by using the escape
character
> > *twice* as braces around characters which denote special characters
> > like:
> >
> > value -> value
> > value: -> value_c_
> > at:put: -> at_c_put_c_
> > == -> _ee_
> > <= -> _le_
> > ugly_accessor_method -> ugly___accessor___method
Sure, that would work. I guess your method could be described in a single
rule as 'surround any consecutive special characters with the escape ("_")
character on either side'.
Torge's two-character scheme is a little bit simpler, although yours is
reasonably simple too and is more readable for the common case of keyword
selectors. Either way sounds okay to me.
> > and multiple '_':
> >
> > very__ugly__accessor__method -> very____ugly____accessor____method
> > or
> > very__ugly__accessor__method -> very_uu_ugly_uu_accessor_uu_method
> > (u for underline).
> >
>
> I've been catched by the ambiguity problem:
>
> If using multiple '_' like in the first case
> problemAccessor_:eee:
> translated to
> -> problemAccessor____c_eee_c_
> could also mean
> problemAccessor__c===c_
> .
>
> So its better to use the second variant
> -> problemAccessor_u__c_eee_c_
> which should work.
(Actually, that should be -> problemAccessor_uc_eee_c_ right?)
- Doug Way
dway at mat.net
More information about the Squeak-dev
mailing list
|