From jan@swi.psy.uva.nl  Mon Dec 18 14:01:32 2000
Received: from gollem.swi.psy.uva.nl (gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id OAA06710;
	Mon, 18 Dec 2000 14:01:32 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id NAA23267;
	Mon, 18 Dec 2000 13:58:32 +0100
Date: Mon, 18 Dec 2000 13:58:32 +0100
Message-Id: <200012181258.NAA23267@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: swi jpl character coding
To: Paul Singleton <p.singleton@keele.ac.uk>,
        SWI Prolog <prolog@swi.psy.uva.nl>
In-Reply-To: Paul Singleton's message of Sat, 16 Dec 2000 15:08:44 +0000
Phone: +31 - 20 - 525 6121
Cc: Jan Wielemaker <jan@swi.psy.uva.nl>

> Jan Wielemaker wrote:
> 
> > One problem might be the textual
> > representation of atoms containing illegal UTF-8 sequences.  It whould
> > be nice if write_canonical and read can deal with *any* Prolog term.
> 
> [including floats, and cyclic and recombinant terms please! :-]

You mean write_canonical should write floats at maximum precision?
See the Prolog flag `float_format' Cyclic terms don't have a textual
representation in the (ISO) syntax and (as discussed before) are so
poorly supported that writing is just a minor problem.

With recombinant you mean ?- X = foo(A), Y = bar(X,X). (i.e. a term
with shared subterms)?  Basically there is no way to distinguish this
from bar(foo(A), foo(A)), except if you use set_arg/3 to modify the
shared subterm.  You want this for compactness of the written term?

> > Assuming UTF-8 you could make the atom start with an illegal sequence
> > and add a foreign routine to return its type.
> 
> OK, that's neat: let's have UTF-8 for textual names, hooks for optional
> custom handling of non-UTF-8 atoms (with some default catch-all handling).

I wouldn't claim `neat'.  `Hacky but useful'?  One thing is you don't
want to know how Prolog stores its atoms.

> NB is there some de facto standard type system we should be using, e.g.
> those MIME type thingies?

depends on these types yoy want want to express, I would say.

	Regards --- Jan

