On 09/28/2017 04:53 AM, oldk1331 wrote:
>>> specify type. Like you can use
>>>
>>>    x := wrap y
>>>
>>> instead of
>>>
>>>    x : Maybe A_VERY_LONG_TYPE := coerce y

one usually writes

  x := y :: SOME_TYPE

so I wouldn't be against

  y :: Maybe(T)

even if T is A_VERY_LONG_TYPE. As Bill said, one can use a macro to make
it more readable.

I tend to be more on the side of coerce/retract instead of wrap/unwrap.

Unfortunately 'wrap' has noting that reminds me of the fact that the
result type is Maybe(.). Perhaps maybe: T -> Maybe(T) would also be a
good name with counterpart retract: Maybe(T) -> T.

I think that x :: T instead of retract(x) also looks nice.

But, actually, I don't want to discuss the syntax at this point. (I even
think that Partial as in Aldor, is a better name than Maybe.)

Most important is if Qian can prove that the concept makes sense in
order to speed up certain parts of FriCAS. And I am happy that he is so
eager to look seriously into this issue.

Ralf

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