[clean-list] Serializing Atomic Data Types...

Fabien Todescato f.todescato@larisys.fr
Wed, 22 Nov 2000 11:39:12 +0100


Dear Erik,

I am the originator of the serializing question to which John Groningen
kindly answered.

I come from a C++/STL programming background where generic programming =
is
related to the use of templates to implement efficient generic =
algorithms.

I have built from our own purposes a modest library of algorithms and =
data
structures based on what I think is a possible adaptation of C++/STL =
generic
programming to the philosophy of modern functional languages like =
Clean.
Namely, I use type classes and type constructors classes to have =
overloaded
operators that I may use in generic algorithms. The generic algorithms =
are
functions with a type-context related to the required overloaded =
operators.

I am also considering implementing overloaded opartors for =
serialization of
the standard data structures currently existing.

Now, as I am a moderately experienced functional programmer, I would =
greatly
appreciate some more information about generic programming in Clean, =
and in
modern functional programming languages in general.

Could you please send me some pointers ?

Thanks a lot, Fabien TODESCATO


-----Message d'origine-----
De : F.S.A.Zuurbier@inter.nl.net [mailto:F.S.A.Zuurbier@inter.nl.net]
Envoy=E9 : mercredi 22 novembre 2000 11:16
=C0 : clean-list@cs.kun.nl
Objet : Re: [clean-list] Serializing Atomic Data Types...


John van Groningen wrote:
=3D=3D=3D=3D=3D=3D=3D=3D=3D
>Is there an efficient means to convert Reals and Ints to their binary=20
>representation stored in a String, and back ?=20

For integers you can use >> and toChar, e.g.:=20

(snip)

For reals you could use the following (not really Clean) functions, to =
split

a 64 bit real representation into two 32 bit integers:=20

(snip)
=3D=3D=3D=3D=3D=3D=3D=3D=3D
I guess serialization will be a good candidate for generic programming =
that
recently found its way onto Nijmegen's priority list.

Another candidate could be making a copy of a (not essentially)unique
object.

Regards Erik Zuurbier

_______________________________________________
clean-list mailing list
clean-list@cs.kun.nl
http://www.cs.kun.nl/mailman/listinfo/clean-list