Well, there is certainly a reason why |Pi| gives these extra parentheses,
but I do not know what to do here.

This is a name clash: Pi is a type and for that reasons gets parentheses
around.

Oh, uh, so my suggestion with staying with the convention was not so bad, after all.

Interpreter somewhat copes with this:

(7) -> )expose MATHSYM
(7) -> Pi

    (7)  Pi
                                                                    Type: Type
(8) -> Pi()

    (8)  Π
                                                                  Type: Symbol
but this is really not supported and may cause trouble in many
places.

Clear.
Different from Aldor, FriCAS does not distinguish between constants of type X, i.e.

  foo: Integer := 1

and nullary functions

  foo(): Integer == -1

So I am surprised that (7) and (8) from above seem to give something different. However, due to the fact that the type Pi is defined as

https://github.com/fricas/fricas/blob/master/src/algebra/expr.spad#L1079

  Pi() : Exports == Implementation where ...

users have to learn another convention (that types behave more like constants than ordinary nullary functions).

So we need to rename something.  Either type Pi to say HackPi or
function Pi to say Pi_sym.  Probably the first, so Pi as type
name is quite intrusive.

My wish is/was clear. Lower case initial letter for any ordinary function, capital initial letter only for constructors and no exceptions.

But if you insist on leaving MathematicalSymbols as is, then I can live with renaming the type Pi to HackPi.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/2977b1e5-3686-44da-ad66-c8ea607e0eef%40hemmecke.org.

Reply via email to