On Tue, Jun 12, 2018 at 9:37 AM, oldk1331 <oldk1...@gmail.com> wrote: > Clearly domain "Void" is the unit type: > https://en.wikipedia.org/wiki/Unit_type > > So I'm clearing this up. >
I think that fixes and better documentation of the Void, Exit, and None domains are quite welcome but still warrant some discussion. From a formal linguistic or categorical point of view Void (terminal object) and Exit (initial object) are more important than they look. As a category, FriCAS domains should form at least a Cartesian category (although I think an even better model might be a topos). 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() == "()" Is the Lisp function call voidValue really important for some reason like in-line optimization? 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." >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. -- 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.