I would like to suggest again to use Maybe over Union("failed", ...):

1. It has better abstraction.  With "Union", you stuck with
hardcoded "failed" tag, it should be hidden under abstraction.

2. Better performance.  As previous discussion showed.

3. There is a problem for "Union", there is this common idiom:

a := xxxIfCan(xxx)
a case "failed" => xxx
a::A_VERY_LONG_TYPE

With Maybe, there's no need to specify this long type, we can abstract
it into a function.

And I nolonger insist to add Monad together with Maybe,
Monad can be added later.  For now, Maybe can be a simple
encapsulation over Union("failed", ...), with specialization for
commonly used types.

-- 
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