2012-04-30

typed enclosures

4.29: mis.adda/syntax/typed enclosures:
. adda currently reserves the square brackets
as a way to allow more freedom in identifier spellings:
. the space and all printable characters are allowed
as long as every use of square brackets is paired,
because then the ending bracket is well-defined;
eg, [*thi{ i$ ()ne [eg@l iden]ifier] .
. one way to allow multiple uses for square brackets
is to reserve typed brackets: eg,
[this is a single symbol] --. no typing syntax .
[.M(2,3): ...] --. this is typed as being a 2x3 matrix .
{.R: [a,b)} -- a <= x < b for x in reals .
mis:
. this seems too arbitrary, with no compelling use cases ...
sci:
. however, look at the angle brackets:
while the type is .< ... >
the other use is as a value:
<. ... > or <.type: ...>
and of course the 3rd use is as the less-than,
without any dots nearby .

1 comment:

  1. 6.25: adda/syntax/cstr/declare block differentiated from named param's:
    . adda needs a declare block indicator
    so that it can tell the diff'tween params named associations,
    and declare blocks declarations
    when the block is returning an arg to a function .
    . we do alread have that as typed enclosures:
    (.proc ...), is your typical c declare block .

    ReplyDelete