On Fri, Feb 18, 2011 at 12:12 PM, daly <d...@axiom-developer.org> wrote: >> The python community is huge, skills are available, >> and often the needs are not in the core science algorithm >> which is well looked after, but in the glue and interface, >> which requires a less in-depth understanding of the science >> than the core algorithm. It allows non-niche programmers to assist >> more easily than... FORTRAN. > > I do think Sage has proven the conjecture that Python is an excellent > choice for a glue language (although a lot of the actual glue seems > to be in Cython?).
Cython happens to be a particularly nice "glue" when it comes to interfacing with C libraries. I would however say that the majority of code in Sage (both Python and Cython) is not glue (though we of course don't write our own BLAS or integer multiplication routines). > Since Sage is growing by accretion, William made an > excellent choice. > > I don't think Sage has proven the conjecture that Python is good > for computational mathematics. My experience with computational > mathematicians is that they will program in obscure (APL) or > dead (Fortran) languages. Every one I have met over the years > is perfectly capable of writing their algorithms in anything. > > There are two ways to look at any computational mathematics > problem. Either you want something very close to the math, > (e.g. Spad) for conceptual efficiency or very close to the > machine (e.g. C) for execution efficiency. Python sits > somewhere between these two extremes, making it a non-optimal > choice for either. But if Python is good enough, even if not optimal, to reasonably do work on both ends of the spectrum, then the advantage to using a single language can outweigh the advantage of using specialized languages for individual tasks with lost of glue code and context switching. This is especially true for code that starts out close to the math and then can be optimized (rather than re-written) for execution efficiency. > If I were working with Sage I'd write my algorithm in some > other language and "glue it on" with python. > > As for the conjecture that Python is wildly popular and > therefore the perfect choice for computational mathematics > I can only point to history. Pascal was everywhere, including > in the universities. Smalltalk took the world by storm. > PL/I was universal. Ada was the ultimate language. Most > people probably don't even list these languages on their > resume anymore. Wait 10 years. Nobody will admit to knowing > Python. Your summarization of history indicates that no language will survive 10 years, so we should pick a language not on its long-term merits but based on getting something out of it before it "fades." - Robert -- 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