[MLton] Serialization?
John Skaller
skaller@users.sourceforge.net
Wed, 06 Jul 2005 14:40:34 +1000
--=-v5TJyPF0CXNuIs2fGzY+
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Wed, 2005-07-06 at 01:37 +0200, Wesley W. Terpstra wrote:
> On Tue, Jul 05, 2005 at 12:30:56PM -0500, Henry Cejtin wrote:
> > As Stephen said, sharing can be vital any way. As an example, if you h=
ad
> > a circular list (using ref's of course) then without sharing it would b=
e
> > infinite.
>=20
> That's impossible to acheive without refs....
> AFAICT, with ref-less SML you can never have any cycles.
You can do it in Ocaml though:
# let rec x =3D 1::x;;
val x : int list =3D
[1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1; 1;
1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1; 1;
1;
...]
--=20
John Skaller <skaller at users dot sourceforge dot net>
Download Felix: http://felix.sf.net
--=-v5TJyPF0CXNuIs2fGzY+
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQBCy2DCw7vY25tjqN4RAioNAJ9fTJbu0MGYftemmnNgDQNF8/0eWACfaiJk
HkIr9GdPmuItLOm8A/lFm0c=
=AOTH
-----END PGP SIGNATURE-----
--=-v5TJyPF0CXNuIs2fGzY+--