Ralf Hemmecke wrote:
> 
> > The problem is that data has "wrong" tags.  First, Lisp types are
> > different than FriCAS types.
> 
> I think that is clear.
> 
> > Even in cases when at first glance Lisp and FriCAS types look the
> > same, there may be significant difference.  For example FriCAS
> > scripted symbols are not Lisp symbols.
> 
> OK, but why would that be a problem for a Maybe domain? Doesn't it just
> say that Maybe(Symbol) has to have a special treatment?
> 
> > And FriCAS considers lists
> > and symbols as disjoint, but in Lisp NIL is _both_ symbol and a
> > list.
> 
> Again, that can be properly implemented by choosing an appropriate
> representation for Maybe(T) when T is Symbol or T is List(..).
> 
> > In BOOT code where we use Lisp semantics we have bunch of bugs:
> > we can not correctly handle NIL as a symbol, because empty list
> > meaning forces interpretation incompatible with semantics of
> > symbols.
> 
> That can be a problem, but why not try (as Qian already started) and
> introduce a Maybe domain and see how far we can get and what benefit
> that has? Qian can certainly do this on a git branch until it is ready
> to be merged.

I was specificaly writing about use of Lisp tags.  Concerning
Maybe: instead of tags there is much simpler way.  Lisp
allows creating so called "uninterned symbols".  Such symbols
are guarenteed to be different than any other Lisp data.
So one can use such symbol as marker of failure and retrun
either it or real data.  This is similar to what XHashTable
is doing.  There is drawback: in Lisp level printouts instead
of "failed" (which is Lisp string and prints in natural way)
one gets meaningless jumbo like #:G728.  And there is no way
to creante "the same thing" for testing or debugging purpose
(one have to use original stored in some variable).


-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to