Dot notation and a crazy idea

Bob Arning arning at charm.net
Fri Mar 19 16:32:03 UTC 1999


On Fri, 19 Mar 1999 13:17:30 +0100 Marcel Weiher <marcel at system.de> wrote: 
>I also am reminded of C-- etc. when I see all those dots, so are  
>there ideas for another equivalent  path-separator or do we just have  
>to overcome our collective phobia?

One of the things not clear to me so far (and previously asked by someone else) was whether the xxx.yyyy.zz expression would be completley resolved at compile time or if it would partially or completely wait until runtime for resolution. If the former, then I think we are looking at a syntax change, but if the latter, then we have more options:

STA did something like this:

aClass _ SomeLibrary @ #ANestedLibrary @ #ANestedClass.

which is all just normal message sends. Alternatives to the $@ might include $/ or $\ with their already familiar path connotation or #at: for those who dislike binary selectors. I suppose that some might argue the example above is more verbose than simple dots, but I can't picture this being sprinkled so liberally through ones code that a few extra characters make that big a difference. Personally, I would like to see the namespace code woking without a syntax change before adding that wrinkle. Alternatives include:

aClass _ Smalltalk resolve: #(SomeLibrary ANestedLibrary ANestedClass).
aClass _ Smalltalk resolve: #SomeLibrary:ANestedLibrary:ANestedClass:.
aClass _ #SomeLibrary:ANestedLibrary:ANestedClass: resolvePath.

Cheers,
Bob





More information about the Squeak-dev mailing list