[m-dev.] My wishlist for 0.14
doug.auclair at logicaltypes.com
doug.auclair at logicaltypes.com
Thu Mar 9 14:46:59 AEDT 2006
Now that 0.13 is nearly upon us (with my concern that I still
cannot build slice/ on powerpc.apple.darwin8.3 with
ROTD-2006-03-07), I figured I put forward my 'wishlist' for
release 0.14 ... in the spirit of facilitating program
development -- eliminating unnecessary obstacles and adding
useful new functionally; that kind of wishlist ... hey! one
can dream, can't one?
* I wish that every library call I make that is a function/N
wouldn't cause the compiler to throw an ambiguity error as
to whether I mean the function/N call or the equivalent
predicate/N+1 call. I hate this! I especially hate it when
there can be no ambiguity from the type and mode declarations
that a curried pred is NOT the unification, but the returned
value of the function IS. So I wish that all predicates
that have equivalent function declarations/definitions
be removed from the standard library.
* I also wish that the compiler wouldn't throw ambiguity
errors when I'm designating a pair in one situation and
subtraction in another. Each instance is clearly (eventually)
typed and moded, but I still get the ambiguity error until
I create these little one line auxilary predicates that
only serve the purpose of casting the subtraction to a
number and casting the pair to a pair. Tiresome.
* I wish that list(io.poly_type) was an acceptable argument type
to io.format/4. I also hate it when the compiler tells me
that io.format/4 needs string.poly_type within arg2 when
I see clear as day that the library says io.format/4
takes a list(io.poly_type) argument.
* I wish io.format/4 allowed something like Prolog's and
Dylan's '~w' argument (for Mercury, it'd be '%w') where
the corresponding argument would be a typed predicate:
(pred(T::in, io::di, io::uo) is det)
that tells io.format/4 how to print a T. And, while
we're at it, give string_streams (whatever they turn
out to be) that power, too: any arbitrary T can be
written out to an output stream, so it'd be nice if
io.format/4 and string_streams could have 'put'
functionality of the same strength.
* I wish std_util was 1/10th its current size: 'pair'
is part of std_util? Strange! And what are all these
type_<foo> types and predicates doing hanging out
here /and/ in module type_desc? Also, 'maybe' a
new module named 'monad' or something to handle
foldl_maybe and its 45,000 variations in std_util?
With all these huge sections of disparate protocol
declarations, it looks as if std_util is a dumping
ground, so nuggets of useful functionally are
buried under this sea of pel-mel functionality.
* I wish module io was maybe 5 modules, or even 10,
instead of this huge thing one needs scroll through
with a bewildered look on one's face looking for
the signature of command_line_arguments/3.
* I wish, for the HTML library docs, that it has an
index, sliced-and-diced by name, with a subsection
for types and subsections for preds and funcs. I
wish each library module had a table of contents
for types and preds/funcs.
* /soto voce/: op/3 declarations
* I wish io.state was a typeclass. Sometimes I have
a very different idea than the language runtime
what the 'world' is. The stream proposal seems to
be a movement in this direction. I have in mind
something a little more radical.
* ... oh, yes, of course: 'Whirled Peas'.
Just something one thinks on while building a system
in one's favorite programming language ...
Sincerely,
Doug Auclair
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list