> However I am uncertain about your proposed changes to Void. Why do you
> prefer a value of 0 instead of the symbol "()"?  Note of course that
> this is a Lisp symbol and not Lisp NIL. Although the value can be
> anything, as the empty tuple, I think () is more intuitive than 0.  A
> value of 0 might be a bit confusing since the unit *type* is usually
> denoted by 1, not 0. I see no harm in letting the Rep for Void be
> String. In fact why not just define
>
>   void() == "()"

The underlying value of Void is not important, because the type Void
can only have one possible value.  I don't want to use string because of
possible memory waste.

> Is the Lisp function call voidValue really important for some reason
> like in-line optimization?

'voidValue' is used a few places in the compiler.

> Also, why did you make the following changes in Exit?
>
> -        coerce(n:%) == error "Cannot use an Exit value."
> -        n1 = n2     == error "Cannot use an Exit value."

Because Exit is the bottom type, no variable can have an Exit value,
therefore, it can't be printed or compared. When encountering Exit
type, the function aborts.

> From a formal point of view I am not certain at all about None. Since
> FriCAS is a statically typed language I think it would be nice if None
> could be eliminated from the library. FriCAS already has the type Any
> which implements a type-correct version of "duck typing" and plays the
> role of a universal type.

None as the top type is very necessary.  The difference between Any and None
is that Any contains the value and type, None just contains the value. None is
widely used and can't be replaced.  Although I think "None" is a terrible name.

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
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