Larry Wall wrote:
: Void context still exists and is not a form of singular or plural
: context. Perhaps this should be called nullar context, although void
: context works equally well for me and is not confusing because we have
: no Void type.

Nice, without Void we don't need the double headed pseudo type lattice needed if we were to distinguish subs that return no usefull---that is Any---value from the ones that return no value at all.


So let's get just rid of Scalar and List types.

How does that go with the distinction between the container and content type/class? Are all variables then implemented with Parrot level refs/pointers/PMCs and there is no need for a single element container class? Actually I would appreciate this.

With the idea of the Perl6 type system having a type lattice
and | meaning LUB (lowest upper bound) the apex of which would
be Any.

::Any ::= Str | Num | Ref of Any | Array of Any | Hash of Any | ...

The ... is dynamically updated whenever a new toplevel type
is added: Any ::= Any | TheNewType.

How do we name the bottom Type? None? All? The latter would
nicely relate it to the & as the GLB (greatest lower bound).
But OTOH, None feels more natural and is e.g. used by the
Cecil folks as well.


: When we really want a scalar (the thing itself), we call that Any
: context or Scalar context, both forms of singular context (formerly
: called scalar context).

BTW, context is not meaningfull at runtime but only defines what code the compiler generates? E.g. list context would be compiled to some code that gathers the values from the involved expressions, subs and constants---into what? An Array?


: What exactly is the difference between Scalar and Any?
Isn't any, that I can tell.  So maybe we settle on Any for the type
and scalar() for the function/concept.

 It'd be nice if we could
unify those somehow, but any() is taken.  Maybe Item/item().

Just ideas from me for: no value: void, zero one value: mono, unary >1 value: poly, many -- TSa (Thomas SandlaÃ)



Reply via email to