Wed, 22 Mar 2000 17:26:25 +0100 (MET), Bjorn Lisper <[EMAIL PROTECTED]> pisze:
> I don't know about full polymorphism (I guess hseq would not work
> well for function-typed arguments, for instance), but I know there
> are situations where it can be important from a practical perspective
> to add varying degrees of strictness explicitly. Then I think the
> cleanest solution is to have explicit operations which give you this,
> with a clearly stated semantics, rather than the "x==x" kind of hack.
I agree that it should be a separate operation (if it should exist
at all). I only objected to hseq having the type "a -> b -> b",
as seq. It could be "SomeSuitablyNamedClass a => a -> b -> b".
I'm not convinced that it should exist at all. Much can be archieved
by adding strictness flags to data definitions, or at most suitable
problem-specific functions / classes. It should not be *very* important
to evaluate exactly what one has in mind - the essence of laziness
is that it is not harmful - except perfomance... It's good when the
compiler can infer itself where laziness can be safely eliminated.
In imperative programming there are varying degrees of shallow
and deep copying of objects. The problem is that in general there
exists no fixed set of variants covering all needed cases, provided
that we don't distinguish between subobjects that need to be copied
or linked in the type descriptions. Here the situation is similar:
there exists no fixed set of well defined variants. And it's easier
when we mark types instead of providing a polymorphic function.
Fortunately it matters much less than shallow / deep copying - it's
"only" performance. (And fortunately functional languages don't have
the problem of deep copying.)
The definition of seq is quite simple if we define what bottom is
and when two values are "the same". It's much harder with hyperseq,
it depends on what are algebraic types. It's a less "natural" concept.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a22 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-