A Way to express Standard multi-argument Method Signatures in Smalltalk Re: [ANSI-Smalltalk] Next STEPs

Andres Valloud andres.valloud at gmail.com
Sun Mar 9 03:49:09 GMT 2008


Some Smalltalks already know how to tokenize strings given a list of
separators... perhaps it would be worth considering a "well defined" (?)
implementation of that instead.

Andres.

On Sat, Mar 8, 2008 at 3:57 PM, Panu Logic <panulogic at gmail.com> wrote:

>
> In my previous post I proposed  a way to express the signature
> of a Smalltalk method as an evaluable Smalltalk expression
> which evaluates to a set of connected Associations which formally
> express the type-signature of any Smalltalk method, in the form of:
> >  receiverClass  ->  selectorSymbol  -> argumentClass ->   resultClass
>
>
> A question that will  immediately arise is, "What about multiple keyword
> arguments?".
>
> The answer to my mind  is simple: The last leaf in the graph of
> Associations
> is the declaration of the  result-type.
>
> So you could express the signature of a multi-keyword-arguments method as:
>
>   receiverClass  ->  selectorSymbol  -> argClass1 -> argClass2  ....
> ->   resultClass
>
>
> This will still result in an instance of an Association (connected to
> other Associations),
> that would formally express the class of the method, the name of the
> method,
> its argument-types. and its result-type.  The point is simply that the
> result-type is
> the "last leaf in the chain".
>
>
>
> Thanks
> -Panu Viljamaa
>
>
>
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080308/01a63717/attachment.htm


More information about the ANSI-Smalltalk mailing list