I thought Python was strongly typed. Definition from Wikipedia:

"Most generally, "strong typing" implies that the programming language
places severe restrictions on the intermixing that is permitted to
occur, preventing the compiling or running of source code which uses
data in what is considered to be an invalid way. For instance, an
integer division operation may not be used upon strings; a procedure
which operates upon linked lists may not be used upon numbers.
However, the nature and strength of these restrictions is highly
variable."

What do you mean by saying it isn't?

On Nov 14, 3:17 pm, Tim Daly <d...@axiom-developer.org> wrote:
>   I am not the best person to ask as I have a vested interest.
>
> I find that mathematical notation is strongly context
> sensitive which gets translated into types when done
> as computational mathematics. Thus, I believe that a
> mathematical language needs to be strongly typed.
> Python is not strongly typed.
>
> Axiom has two levels of type-strength. The interpreter
> does its best to guess types so the user can give short
> and reasonable inputs. The compiler requires extremely
> strong typing to ensure that the algorithms match the
> intentions. The fact that the compiler does not make
> guesses makes it more challenging to develop library code
> but increases the chance that the algorithm is correct.
> Python does not compile.
>
> In addition, I believe that a computational mathematics
> language has to have a strong connection to the underlying
> mathematics. In Axiom's case, abstract algebra provides the
> mathematical framework for providing categories around which
> the algorithms are structured. Sage does not seem to have a
> strong scaffold for adding new packages. It appears to be
> growing by accretion.
>
> There are two extensions I would like to have which is
> the use of unicode and the use of two dimensional input.
> Sage/Python has a chance for a big win here.
>
> I think that unicode input which allows greek and other
> symbols would make the input closer to the original mathematics
> notation. Unfortunately, my thesis work showed me that
> mathematical notation is highly ambiguous. In fact, I have
> come to the conclusion that the equations in a book are
> pretty much content free. The real mathematics is actually
> contained in the surrounding text. To see this effect take
> your favorite textbook, remove everything but the equations
> and you'll find that you have lost the meaning of the symbols.
> Without context, E=MC^2 is a meaningless jumble of symbols.
>
> I think that two dimensional input is also a huge win.
> However, I worked on two dimensional input at IBM Research.
> I know of several attempts to do the same thing. The most
> recent attempt that I saw was at the University of Waterloo.
> I do not know what became of this effort but I know that
> two dimensional input is hard and very ambiguous.
>
> In any case, computational mathematics is more about the
> algorithms than about the notation. A strong mathematical
> framework and strong typing are more important than I/O.
>
> By the way, the Axiom Spad language is very much like Python.
> It uses indentation to group code. It has list comprehensions.
> It has many more data structures than Python. It dispatches
> not only on the types of the arguments but also on the type
> of the result (something few languages allow even today).
>
> Spad can be either interpreted or compiled. It can communicate
> with lisp (the implementation language), C (the whole graphics
> subsystem is written in C), javascript (the browser frontend
> is AJAX/Javascript/HTML), Fortran (the commercial version
> called the NAG fortran library routines), etc. The claim that
> Python is an exceptional language for computation mathematics
> or is exceptional as a "glue" language completely ignores
> history which tends to make us old people cranky.
>
> I think the Sage language designers could steal a few useful
> ideas from the Spad language.
>
> I also find the Python/Lisp debate useless. In Axiom, Lisp is
> the implementation language but you can use Axiom for years and
> not know that because Spad is the computational algorithm language.
>
> In Sage there is confusion about the implementation language of
> Python and the computational mathematics language built in Python
> which appears not to have a name.
>
> Tim Daly
>
> On 11/14/2010 2:45 PM, Dr. David Kirkby wrote:
>
>
>
>
>
>
>
> > On 11/14/10 07:00 PM, Tim Daly wrote:
> >> I find it amusing that mathematicians are being told that
> >> a math-specific language is a liability. Mathematics is,
> >> after all, a specialized language that took me years to
> >> learn.
>
> > I asked RJF what languge he thought the interface should be. As 10
> > options I consider might be viable choises where
>
> >  1) Create an entirely new language.
> >  2) Python
> >  3) Maxima
> >  4) A Mathematica like interface
> >  5) A MATLAB like interface
> >  6) A Maple-like interface
> >  7) A Magma-like interface
> >  8) Lisp
> >  9) Q - see
> >http://en.wikipedia.org/wiki/Q_%28equational_programming_language%29
> >  10) Purehttp://code.google.com/p/pure-lang/is another possibility,
> > but that did not exist until 2008, but is based on  Q, which existed
> > prior to Sage
>
> > He failed to response. (He would rather tell me on the Maxima list
> > that I can create an infinite set of integers to do some testing.) But
> > that is to be expected from Richard - a signal to noise ratio of about
> > -30 dB.
>
> > But what do you think is the ideal language for a user interface?
> > There have been endless attempts at cleating new languages (#1 above).
> > I've even done it myself, to the extent of writing a couple of hundred
> > lines of code for lex and yacc. But it's a very difficult problem to
> > get right, and quite honestly requires a set of sills I don't think a
> > single Sage developer processes.
>
> > "Pure" seems an interesting language to me. It is headed by someone
> > with both a a maths and a computer science background. But the number
> > of developers can be counted on one hand I think.
>
> > I agree with William, the best language does depend on the problem. I
> > use both Mathematica and MATLAB and its pretty clear to me that they
> > have their strengths and weaknesses, and one language is more suited
> > to some problems than the other. There are some mathematical tasks
> > that I think are best done with Labview - something totally different
> > to Sage, Axiom, Mathematica, Maple, MATLAB and I assume Magma too,
> > though I have never used Magma.
>
> > The "glue" language is another issue altogether.
>
> > The biggest benefit for Python has seemed to be the number of
> > developers. I simply don't think that would exist if using Lisp, Pure
> > or something else a bit more obscure.
>
> > Dave

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to