[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Reformulated numeric-tower ballot

On 05/15/2014 06:25 AM, John Cowan wrote:
> Per Bothner scripsit:
>> Once this is "in harbor" (to use a Norwegian idiom) my plan is to
>> focus on libraries and the rest of r7rs support.
> Excellent.  If you would (no hurry), can you look over
> LibraryDeclarationsCowan to see if it makes sense to you?

My first reaction is it seems like overkill, at least for a Scheme standard.
They may be reasonable place-holders for experimentation and possibly
future standardization.

reexport seems a useful convenience.

I'm uncertain about export-all.  Kawa by default does this if there
is no module-export or export form.  (Binding defined by define-private
are excepted.)  It might be useful to have an 'except' option if this is added.

The optimization options have a 80's feel to them.  I'm not sure how useful
they'd be to Kawa.  Maybe debuggability to control whether to force better exceptions,
as an example.

Kawa has a module-compile-options and with-compile-options that provide some
related functionality, though it's mainly used to control warnings:
For example with-compile-options can be used with full-tailcalls to
control the generated calling convention for a given set of procedures.

The Numeric tower specifications seem rather ad hoc, and I suspect will
see limited use.

The Types features might be useful.  However, it's a big can of worms.
Kawa already has type-specifiers, which are at the declaration site.
I think that is more readable, easier to keep updated, and more general
(since they can be used for local declarations).

A subset of Kawa's specifiers could be quite portable:

(define VAR ::TYPE VALUE)

could be defined as:

(type VAR TYPE?)
(define VAR VALUE)

but allowing implementation extensions for TYPE.

(Kawa goes the other way.  If the name TEST? is unbound,
but TEST is an existing type, then TEST? defaults to an
instance-of predicate for TEST.  For example vector is
not a procedure in Kawa - it is a type.  When you "apply" a
type you call it's constructor function.)

I would prefer the provide syntax to be:
   (provide 'feature-identifier)
for historic compatibility.  This is what Kawa "provides".
The syntax: (provide 'FEATURE)
expands to (define %provide$FEATURE <unspecified>)
and then cond-expand checks if %provide$FEATURE is in the
(lexical) scope.
	--Per Bothner
per@x   http://per.bothner.com/

Scheme-reports mailing list