This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: type declaration best practices?


* Per Bothner [2010-01-13 09:54+0100] writes:

> One problem is do:
>   (do ((i a b)) ...)
> Does this mean a is a type specifier for i, and i is initialized to b,
> or does it mean that a is the initial value and b the update expression?

Well, this one is easy.  Scheme's do always has 3 arguments and never 2
so a is the init form and b is the step form.  A typed version could
look like (do ((i type init step)))  )

> I agree the traditional "Schemy" way to handle things like specifiers
> would be to use parenthesis grouping, and in general positional
> syntax. 

IMO that's a consequence of the limitations of syntax patterns. If
syntax patterns could match keywords easily, keywords would be used more
often.  Conversely, if you are going to use keywords a lot, then maybe
syntax patterns should be extended to support keyword matching.

Helmut


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]