On Wed, Feb 24, 2021 at 06:12:45PM +0800, Qian Yun wrote:
> 
> 
> On 2/24/21 2:00 AM, Waldek Hebisch wrote:
> > On Tue, Feb 23, 2021 at 10:03:25AM +0800, Qian Yun wrote:
> > > 
> > > I would like FriCAS to move away from "failed" and choose Haskell style
> > > "Maybe" instead.  This topic has been discussed before, I wonder if
> > > Waldek's opinion has changed.
> > 
> > Up to now I saw nothing to change my opinion.  To clarify, automatic
> > "lifting" of operations for T to say Maybe(T) would be useful.
> 
> Why would that be useful?  I think explicit type conversion is
> better than implicit/automatic type conversion.

It is really about automatically generating boilerplate code.
If you do not want what Haskell offers and prefer to write
code by hand, then I do not understand why you want Maybe.
 
> > But up to now I do not see workable proposal how to implement
> > such lifting and what exact rules should be.  Without viable
> > strategy for implementing extra functionality change to
> > Maybe from my point of view looks pointless.
> > 
> > To put is differenly, I view compiler, language and coding idioms
> > as a whole.  Clearly many language constructs need compiler
> > support.  Coding idioms depend on language and compiler.
> > New coding idiom my be quite useful without new support.
> > But IMO usefulness of Maybe depends very much on features
> > of Haskell and Haskell compiler.  While it may be
> > possible to have useful effect is quite different way,
> > mere change of notation does not look useful.
> > 
> 
> I think in Haskell, "Maybe" is purely implemented as library
> and requires zero compiler support.

I admit that my understandin of Maybe is rather shallow,
so please correct me if I am wrong.  However I think:
- Maybe is implementd by library
- Maybe depends on language/compiler support is sense that
  similar code in other language would _not_ work, and
  without optimizations in current Haskell compiler
  Maybe would significanly slow down programs

This is similar to fact that many Spad codes depend on
parametrized types, without such types code can not
be translated in simple way.

-- 
                              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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/20210224124503.GA3478%40math.uni.wroc.pl.

Reply via email to