On 22 October 2016 at 02:31, oldk1331 <[email protected]> wrote:
>> I still don't like "Functor" as a name.
>
> That's still debatable, and which name do you prefer?
>

I think it is possible (may even desirable) to ignore the use of
Functor in Haskell and instead focus directly on the connection with
mathematical category theory. In that case the name 'Functorial' as
implemented in OpenAxiom is probably better.

>> I'd rather would like to change the
>> signature of "map" from
>>
>>   map: (f: S -> S, %) -> %
>>
>>  into
>>
>>    map: (f: S -> S) -> (% -> %)
>>
>> and then it becomes clearer
>

This is equivalent and always possible with multi-argument side-effect
free operators but FriCAS does not usually implement these
higher-order forms. Why do you prefer it in this case?

> That seems like a good idea in my first glance, but it has
> one big disadvantage:
>
> Since % does not appear in parameter, you have to use
> @ to select it, because type inference will not work.
>

In FriCAS type inference with respect to the result is supposed to
work, albeit perhaps with some limitations . But you are right that in
many cases it is necessary to specify it explicitly.

> Side note: Haskell doesn't have this problem because of
> currying, but I think currying has both advantages and
> disadvantages.  "map:(S->S,%)->%"  looks good to me.
>

You mean for example if we define an operator

  f: (A,B) -> C

we would automatically have

  f(a) : B -> C

for all a:A.

Could you give some examples of the disadvantages of such automatic
currying? Certainly implementing some explicit transformations might
be desirable in the compiler and are already implemented in the FriCAS
library.

-- 
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 [email protected].
To post to this group, send email to [email protected].
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