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

Panu Logic panulogic at gmail.com
Tue Mar 11 01:03:44 GMT 2008


I think Association is the THE universal data-structure
that can be used for most anything. I find it beautiful,  and
functional. It is beautiful because it is abstract, and generic,
and most simple, in my view. It is SYMBOLIC because it
associates one thing with another. 

Part of the inspiration for this proposal came from how
signatures are expressed in Haskell, which I find elegant
in its minimalism.

We could define special syntax, or special classes and
methods for expressing method-signatures;  if  you have
a good suggestion I think it's worth a look.  I would  hope
that most agree that when defining a "standard" it is good
 to have an unambiguous, preferably formal,  preferably as
simple as possible (but no simpler)  language for doing so.

Using something that already exists in every Smalltalk
(Association) adds to the simplicity of this solution.

If the symbol #-> is all we need for expressing  method signatures
as evaluable expressions which return a data-structure which
represents the type signature in memory, with no need for special
machinery for parsing it, then I'd vote for this type of minimalism.

A benefit of minimal machinery for expressing something is also
that there will be less of a disagreement about details, because there
will be fewer of those. This may somehow relate to Occam's razor.
With fewer details there is less room for errors.

But as said, this can't be the only possible alternative.

I guess what I'm saying here is that a Smalltalk Standard should
also define a standard way of defining method signatures, and
as of current there is no  standard for that, is there?

-Panu  Viljamaa



Ralph Johnson wrote:
> I don't understand why you would want to use associations for this
> purpose.  That is an ugly hack.
>
> -Ralph
>
> _______________________________________________
> ANSI-Smalltalk mailing list
> ANSI-Smalltalk at lists.openskills.org
> http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk
>
>   





More information about the ANSI-Smalltalk mailing list