A provocative naming idea for "setter" methods

Diego Fernandez diegof79 at gmail.com
Tue Sep 20 09:48:16 PDT 2005


I'm new to Slate and from the point of view of an Smalltalker, the Slate 
syntax look very complicated now. 

I think that this complexity problem is worse than the problem you have 
mentioned.
Why just don't use categories to avoid confusion? 
If you have a "handle:" setter, use a proper method categorization (like 
"accessing"). 
I think that this simple solution is enough to avoid confusion.

If you want to create tools that handle mutators methods in a special way, 
you can easily add some kind of meta data to each method without changing 
the language syntax.


On 9/20/05, Brian Rice <water at tunes.org> wrote:
> 
> I forgot to note that using a binary selector would make "<A< (3 +
> 4)" needed to set A to 3 + 4. "<A< 3 + 4" would set A to 3 and return
> 7! :\ I'm not sure I'm entirely happy with this aspect.
> 
> On Sep 19, 2005, at 7:42 PM, Brian Rice wrote:
> 
> > It would also be a little nicer to have binary-selectors used (for
> > their lower/easier precedence), since Slate allows for something
> > that Smalltalk-80 doesn't: alphanumerics inside of binary
> > selectors. For example, cross- and dot-products in Slate don't have
> > to be dot: and cross:, but can be instead <dot> and <cross>; the <>
> > symbols at the ends make it read and look like an operator (html-
> > tag-lookalikes notwithstanding). I actually made those to get an
> > idea of being able to write binary selectors that could be related
> > to Unicode symbols more clearly.
> >
> > But in this case, it'd be nice to be able to say, instead of "(A:
> > someValue) doSomethingWith: B", i could do something like "<A<
> > someValue doSomethingWith: B". Or "<A< (<B< 0)" instead of "(a: (b:
> > 0))".
> 
> --
> -Brian
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /archives/slate/attachments/20050920/80797128/attachment.htm


More information about the Slate mailing list