Thanks again for the explanations. I realize that there were many things 
about Julia/Nemo which I had misunderstood. Let me explain a little, so I 
can (i) embarrass myself a little more, and (ii) perhaps give an indication 
of common mistakes, for anyone who would write a tutorial about Julia/Nemo 
:-)

Mistake (1): taking it for OOP. When hearing about the way Julia worked, I 
jumped when I saw it wasn't OO, and then naturally was looking for ways to 
emulate OOP with Julia (rather than make the effort of a paradigm shift). 
And with multi-dispatch, i thought OK, if I want to write code that applies 
to objects of type A, B and C at once, just declare them A <: X, B <: X and 
C <: X and define f(x :: X). However this gave me the wrong intuition " A 
<: X is the same as A inherits from X". 

At this point, the fact that abstract types could be instantiated was seen 
as a limitation compared to OOP. And somehow, it is. Except at the same 
time, the type system does many new things. Apples and oranges, really.

Mistake (2): taking types for sets. This little discussion about names 
reveals another mistake of mine: thinking of types as sets. I thought ZZ <: 
QQ for example. That's not even consistent with the previous mistake. In 
Sage say, i'm guessing QQ is of type Field or something, which inherits 
from a type Ring or something -- but not the other way around! So mistake 
(1) should have led me to believe QQ <: ZZ. Oh well. 

Mistake (3): thinking about Sage too much. To my discharge, ZZ in Sage is 
an object, like 1/2, not a type or anything. This has unconsciously 
contributed to my confusion greatly. Also the fact that there is a coercion 
from ZZ to QQ, and somewhere I must have taken A <: B to mean "there is a 
coercion from A to B".

Pierre






>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to