[m-dev.] Language interface improvements

Fergus Henderson fjh at cs.mu.oz.au
Wed Nov 19 19:14:08 AEDT 1997


Peter Schachte, you wrote:
> 
> But don't forget the other half of what Zoltan asked about:  parsing.

We can handle that with the same mechanism, we just need to work out the
details (e.g. class names).

> You'd
> need two type classes for input, say `readable' and `parsable' (maybe you
> can think of better names), where readable:parsable::printable:portrayable.
> Same idea:  read checks if the thing to be read is parsable, and if so calls
> the parse code, otherwise it just invokes the usual read code.

Currently `read' and `write' are analagous.  I think this should remain the
case.  They should both read/write only the standard format.
If we want an equivalent to `print' (reading/writing in user-defined format),
I think we should call it something else -- how about `scan'? 
(Think printf/scanf ;-)

I'm happy with `parse' as an analogy to `portray'.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list