Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica 6.0 Changes Everything

  1. May 7, 2007 #1
    Wolfram Research has unveiled the new Mathematica 6.0, heralding it as their most significant product since its first release twenty years ago .

    Mathematica 5.2 was already the #1 technical computing software, and was also gaining ground in new market areas, replacing cobwebs of specialized packages. Now I see it replacing loads more software:

    http://www.wolfram.com/products/mathematica/newin6/

    IMO the most incredible part is the way that the core Mathematica system has adapted the changes. The goal has always been to integrate as many features of technical computing as possible in a coherent and unified way. In the long run, I think Wolfram Research will be the only ones computing with Microsoft on the unified front, and by the looks of how smooth the current addition of functionality is with version 6, I think they will be come out ahead on the coherent front.
     
  2. jcsd
  3. May 8, 2007 #2
    You sound like an ad.

    I'm sure it will never replace Matlab, but I'm curious if they're trying to.
     
  4. May 9, 2007 #3
    Pardon me for being excited, only time will tell the true impact of this software.

    Your right; after all, there are hundreds of millions of lines of COBOL (business language circa 1965) in use, more than mathematica and matlab combined.

    Out of curiosity, I wonder what Matlab does better then Mathematica? I have student versions of both, I'd love to see Matlab do something well.
     
  5. May 9, 2007 #4

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    MATLAB is almost complementary to Mathematica. Anything that one does well, the other tends to do pretty poorly. MATLAB is excellent for any kind of numerical calculation, and does a very good job of automating many engineering tasks (like developing digital filters, or simulating a control loop). Mathematica, on the other hand, excels at symbolic computation and plotting features. MATLAB does include a symbolic toolbox, which is identical to Maple, but it's pretty kludgy compared to Mathematica.

    MATLAB is also much easier for most people to pick up -- it uses simple syntax and only has one data type: matrices of double-precision floating point numbers, which are incredibly easy to grasp. Mathematica, on the other hand, pretty much treats everything like a symbol. Mathematica sometimes makes it pretty hard to tell what the hell is going on internally, since it uses some incredibly complicated data structures, but MATLAB tends to be clear as a bell, since every intermediate result is just another matrix, which you can just view directly.

    To take a real-world example: if you want to numerically integrate a complicated real integral, for example, MATLAB can do it in a couple of lines of code that almost anyone can figure out in a couple of minutes. Mathematica will probably bog you down in a ton of mostly annoying complaints about whether or not constants are real, etc, requiring you to continually revise your instructions until you've got 12 pairs of nested braces to deal with. The syntax can be so frustrating that even I, with 15 years of programming experience, often have to scratch my head and go thumb through users' guides.

    I find distinct applications for both. I use both daily. If I had to give up one, though, it'd be Mathematica.

    - Warren
     
    Last edited: May 9, 2007
  6. May 9, 2007 #5
    Your right, Matlab will return a number ("do it" as you say).

    Wait a minute, are we talking about a numerical integral (NIntegrate), or a symbolic integral (Integrate) ?

    If it was a numeric integral, then every symbol needs a value, and I don't see why it would then wonder if these values were real (since they evaluate to literals).

    If you attempt to numerically integrate a function containing symbolic parameters, it says `Integrand is not numeric'. If you attempt such an integral symbollically, it is sometimes the case that the result depends on the domain of the parameters (e.g. it converges for some values and not others).

    Here is an example:

    Code (Text):
    Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}]

    [tex]\text{If}\left[\Re(a)>0,\frac{\sqrt{\pi }}{2 \sqrt{a}},\text{Integrate}\left[e^{-a x^2},\{x,0,\infty
       \},\text{Assumptions}\to \Re(a)\leq 0\right]\right][/tex]
    If we would rather receive a result, with no concern for correctness we may do:

    Code (Text):
    Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}, GenerateConditions->False]

    [tex]\frac{\sqrt{\pi }}{2 \sqrt{a}}[/tex]

     
    Here is another solution, which I prefer because it is less blind (recall that the underscore _ matches any pattern):


    Code (Text):
    Integrate[ Exp[ -a x^2] , {x, 0 , Infinity}, Assumptions->(_ > 0)]

    [tex]\frac{\sqrt{\pi }}{2 \sqrt{a}}[/tex]

     
    No offense, but it looks like you are arguing against Mathematica because its difficult to learn. But why would anyone learn Mathematica and Matlab, when they can do it all in Mathematica? I could understand if someone learned Matlab, and then realized they needed extra features of mathematica (symbolics, graphics, typesetting, multi-paradigmatic programming, etc), how that person would continue in a limbo of using both softwares. But as someone who knows Mathematica, but is forced to use Matlab to communicate with people who don't, I wish Matlab would go away.
     
  7. May 9, 2007 #6

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I'm not arguing against either package. I use both almost daily, so obviously I find some value in Mathematica.

    Mathematica's learning curve is extremely steep, but that's only part of the problem.

    Say what? It sounds like you've never used MATLAB. Look up the controls toolbox, the signal processing toolbox, Simulink, GUIDE, the C++ connectivity, and many other features which Mathematica simply has no analogue. Mathematica 6.0 appears to be trying to address some of these shortcomings, and if it does so successfully, I may begin to use it for more things. At the moment, I see the two programs as being almost polar opposites in fundamental approach: Mathematica is stodgy and academic and rigorous, for good reason. MATLAB is easy and free-wheeling and, while a little sloppy sometimes, immimently useful in an engineering context.

    If the additional features provided by MATLAB are not useful to you, I can understand why you'd like to stick to Mathematica. On the other hand, it's just plain fact that there are many, many things with are easy to do in MATLAB, yet are difficult or impossible to do in Mathematica. (To be fair, that's also true vice versa.) That's the reason the two products continue to exist side-by-side on the shelves -- not because people are too stupid to realize Mathemetica is plainly better.

    - Warren
     
  8. May 9, 2007 #7
    All of these features are availible in Mathematica, so it is incorrect to say there is "no analogue" (in the sense that Matlab has no analogue for symbolic solutions of ODEs).

    The Mathlink protocol can be used to establish two way communication between C++ apps and the mathematica kernel. In fact, I can pass models from Simulink into mathematica (I don't care for the diagram interface).

    Mathematica has always had the ability to create real-time GUIs, but untill now it always required java (just as GUIDE requires C++) and manual coding (unlike GUIDE) . The GUI creation system in mathematica 6 looks to be the most streamlined I have seen anywhere, but we will see.

    Your right, I was too stupid to realize that there is room for both products. I have been blinded by naively pure academic inclinations, without concern for brutal practicalities. Matlab is much cheaper, and much better suited to the field of engineering for ever reason: the engineers, the type of work they do, and the way they do it. It will take many more upgrades to Mathematica before it will begin encroach on this domain of application.
     
  9. May 9, 2007 #8

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    What are you talking about, man? Mathematica has no package for creating digital filters. If I'm wrong, prove it.

    Okay, I'll concede this one.

    There are various mechanisms to make MATLAB talk to Mathematica, but that doesn't change the fact that, in isolation, Mathematica has nothing even resembling Simulink.

    You know what, Crosson? You have no idea what you're talking about. Why are you arguing this? You apparently know far too little about MATLAB to give it any fair comparison. GUIDE is MATLAB's graphical GUI development environment. It requires no C++, nor any kind of hand-coding.

    The lack of competent GUI tools in Mathematica is a major handicap, and it always has been. I'm happy to see that Wolfram has decided to stop trying to sell the world on his deranged cellular automata obsession, and has instead decided to improve his software.

    Are you actually rescinding your statement that Mathematica can do everything MATLAB can do? Or are you just being cheeky?

    - Warren
     
  10. May 9, 2007 #9
    I said it was unfair to say it has "no analogue", I agree that Matlab has superior packages for creating filters, but it is totally false to say Mathematica has "no analogue". Here I will refer you to built-in tools for signal processing, although there are many 3rd - party packages for doing so.

    http://documents.wolfram.com/applications/signals/index.html

    I don't like the GUI for simulink, but the built-in libraries are valuable. You can get something similar from MathModelica:

    http://www.wolfram.com/products/applications/mathmodelica/

    Again, all of this is to show how wrong you are in saying "no analogue" and "nothing resembling", that is a total mischaracterization. When I say that Matlab has no analogue to symbolic differential equation solving, I mean that it would take 10 years to develop an inferior package to do this task, not that there are existing packages on the market that are nearly as good.

    I don't appreciate the personal attack, especially when you misread my post. I clearly said that GUI creation in Mathematica required manual coding, unlike GUIDE. Upon review I was not as clear as I could have been. My further point is that I don't like to click through a "wizard" to make my interfaces, I would rather create it by typing a few lines as in Mathematica 6 (which also includes wizards, btw).

    I did, afterall, ask the community to provide examples where Matlab is superior. But I do know enough to object to your "no analogue" claim, and that's what I did.

    No I am not rescinding, I am saying that you have shown me that there is room for both softwares on the shelf. That Matlab is the best choice for engineers. I am not being cheeky, with your help I realized how the appeal of Mathematica is academic. As an example, I briefly considered defending my "everything the other can do" by saying that they are both Turing Complete (ha!), then I realized that, left to myself, my criterion for evaluating software is very abstract.
     
    Last edited: May 9, 2007
  11. May 9, 2007 #10

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I don't really think it's fair to start including third-party packages in this discussion. After all, when I assert "Mathematica can't do this," I mean Mathematica itself. If you want to redefine the word "Mathematica" to mean "Mathematica itself and everything ever written on top of it," then fine -- but that's not how we began this discussion.

    ....Except it has a built-in symbolic library which includes ode solvers. Open MATLAB and type 'help desolve':

    Code (Text):

    >> help dsolve
     DSOLVE Symbolic solution of ordinary differential equations.
        DSOLVE('eqn1','eqn2', ...) accepts symbolic equations representing
        ordinary differential equations and initial conditions.  Several
        equations or initial conditions may be grouped together, separated
        by commas, in a single input argument.
     
        By default, the independent variable is 't'. The independent variable
        may be changed from 't' to some other symbolic variable by including
        that variable as the last input argument.
     
        The letter 'D' denotes differentiation with respect to the independent
        variable, i.e. usually d/dt.  A "D" followed by a digit denotes
        repeated differentiation; e.g., D2 is d^2/dt^2.  Any characters
        immediately following these differentiation operators are taken to be
        the dependent variables; e.g., D3y denotes the third derivative
        of y(t). Note that the names of symbolic variables should not contain
        the letter "D".
     
        Initial conditions are specified by equations like 'y(a)=b' or
        'Dy(a) = b' where y is one of the dependent variables and a and b are
        constants.  If the number of initial conditions given is less than the
        number of dependent variables, the resulting solutions will obtain
        arbitrary constants, C1, C2, etc.
     
        Three different types of output are possible.  For one equation and one
        output, the resulting solution is returned, with multiple solutions to
        a nonlinear equation in a symbolic vector.  For several equations and
        an equal number of outputs, the results are sorted in lexicographic
        order and assigned to the outputs.  For several equations and a single
        output, a structure containing the solutions is returned.
     
        If no closed-form (explicit) solution is found, an implicit solution is
        attempted.  When an implicit solution is returned, a warning is given.
        If neither an explicit nor implicit solution can be computed, then a
        warning is given and the empty sym is returned.  In some cases involving
        nonlinear equations, the output will be an equivalent lower order
        differential equation or an integral.
     
        Examples:
     
           dsolve('Dx = -a*x') returns
     
             ans = C1*exp(-a*t)
     
           x = dsolve('Dx = -a*x','x(0) = 1','s') returns
     
             x = exp(-a*s)
     
           y = dsolve('(Dy)^2 + y^2 = 1','y(0) = 0') returns
     
             y =
             [  sin(t)]
             [ -sin(t)]
     
           S = dsolve('Df = f + g','Dg = -f + g','f(0) = 1','g(0) = 2')
           returns a structure S with fields
     
             S.f = exp(t)*cos(t)+2*exp(t)*sin(t)
             S.g = -exp(t)*sin(t)+2*exp(t)*cos(t)
     
           dsolve('Dy = y^2*(1-y^2)') returns
     
           Warning:Explicit solution could not be found; implicit solution returned.
     
           ans =
           t+1/2*log(y-1)-1/2*log(y+1)+1/y+C1=0
     
           dsolve('Df = f + sin(t)', 'f(pi/2) = 0')
           dsolve('D2y = -a^2*y', 'y(0) = 1, Dy(pi/a) = 0')
           S = dsolve('Dx = y', 'Dy = -x', 'x(0)=0', 'y(0)=1')
           S = dsolve('Du=v, Dv=w, Dw=-u','u(0)=0, v(0)=0, w(0)=1')
           w = dsolve('D3w = -w','w(0)=1, Dw(0)=0, D2w(0)=0')
           y = dsolve('D2y = sin(y)'); pretty(y)
     
        See also solve, subs.


        Reference page in Help browser
           doc dsolve
    - Warren
     
  12. May 9, 2007 #11
    False. MATLAB has cell arrays, tuples, structures, objects, strings, etc. And matrices can be in any of a wide range of numeric data types and sizes. Double precision is just the default. Where I work, we routinely switch large matrices between different data types to save space and to read/write certain file formats. Does Mathematica have good, efficient ways of dealing with multi-gigabyte arrays?

    The low cost thing seems important. We have hundreds of MATLAB licenses. Also, speed is critical for us (we run insanely long and large processing jobs). How fast is Mathematica? I honestly don't know -- I've never used it.

    Another thing I'm curious about: is Mathematica easy to program and debug? We write a lot of code, and MATLAB gets used as sort of a quick-and-dirty language, and a "glue" language like Perl (our numeric calculations are for real-world stuff, and have to get "hooked up" to other systems and software in the real world).

    Programmer time can be expensive. MATLAB's code editors, profilers, optimiaztion tools, and debuggers are excellent. How easily could I write a weird-text-file-format-to-XML translator in something like Mathematica?

    I'm just askin'.

    EDIT: By the way, I've never heard anyone where I work say "gee, I wish I had software to solve this differential equation symbolically". I mean, do people still do that? Most real-world DEs don't even have closed-form solutions, right? And what use would they be if they did? The first thing you'd do is plot the solution numerically, anyway!
     
    Last edited: May 9, 2007
  13. May 10, 2007 #12
    Mathematica and Matlab are similar in performance. Mathematica has a few performance pitfalls, but so does Matlab. If programmed correctly, either one can be within 10 to 100 times slower than Fortran.

    As far as cost, I really like the cost of Matlab. The student cost of Mathematica is a miracle, but the professional cost is appalling.

    By any reasonable measure, the Mathematica programming language is the most advanced in the world. Leaving aside the libraries of built in functions, the core language is extremely powerful. The weird-text-file-format-to-XML translator is a project for which Mathematica is ideally suited. The pattern matching features make it so that parsing foreign source is as straight forward as inputing the translation rules in virtually human readable form. You could write a semantically intact compiler for a language like BASIC using less than 20 lines of Mathematica code.

    Mathematica will find solutions to most systems of ODEs (forget about symbolic PDEs except for academic interest) in terms of the worlds largest catalogue of special functions. This is useful for many real-world applications, where it is often important to determine the "eigenvalues" of a high dimensional ODE system with boundary conditions, and this is not always numerically straight forward. Symbolic solutions can also be useful for design purposes, which is one reason to use Matlab and Mathematica together (passing simulink models for symbolic processing).

    Our different ways of looking at the meaning of "built-in" and "part of a sytem" show the differences in the practical vs academic viewpoint. To me the Matlab symbolic functionality is not "part of Matlab" because it is an unplanned add-on licensed from a 3rd party (maplesoft). To you this is absurd, since it's there and it gets the job done. Too me, it is like a sore thumb, just like many parts of Matlab (highly practical parts!). On the other hand Mathematica has such general principles behind its uniform structure of expressions that every package I have used (mostly free ones) fits in seamlessly.
     
    Last edited: May 10, 2007
  14. May 10, 2007 #13

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This gave me a chuckle. What languages are you comparing it against? What features make it so much better?

    I'd love to see this. Do you even understand what exactly the word 'compiler' means?

    It all comes in one box, and it gives you the same answer Mathematica would give you. What's wrong with it? Some sense of "design aesthetics" getting in your way? To me, Mathematica's syntax is a programmer's vision of hell -- it rails against my sense of design aesthetics. Yet I still feel that Mathematica is a very valuable program...

    - Warren
     
  15. May 10, 2007 #14
    I'm so glad you asked. I wonder how much you know about the design issues of programming languages? I ask because most of your arguments in favor of Matlab are not programming language issues, they are issues having to do with availible libraries. This is not interesting to me; the C language does not include Input/Output, so someone else has to write the library, but this does not have weight in the discussion of C as a language.

    1) Mathematica has fully integrated support for all programming paradigms - Functional, Logical, Procedural and Object Oriented. (Do you know 5 examples of each type of language?)

    2) Full support for pattern matching and high-level replacement rules. Patterns can be created to match any data structure, and replacement rules can search for and operate on any class of datastructures, anywhere inside of a larger datastructure. To give you an example, I am working on an AI simulation that has to recognize a data structure that is not entirely known at compile time! It builds the pattern, and proceeds to use it, at run-time. No other general purpose language can do this in such a concise manner, and I am only aware of comparable pattern matching abilities in a few special purpose research languages.

    3) Programs and data are treated on the same footing, they are all called expressions. There is a uniform structure of expressions, they are all built from atoms by composition of functions. This leads to an unequaled level of orthogonality and transparency of semantics.

    4) The syntax that you dislike:

    I am interested in functionality, not aesthetics. I have long argued that the language C is so named for the word "Cool", because if pressed, most of its proponents will cite its syntax as asthetic (and other reasons). To my epistemology this is laughable, I think our minds can acclimate to arbitrarily complex syntax. More practically, I bet there was a time when mathematical equations and symbolics looked very differently to you then they do now.

    I will pick on Matlab. In various contexts, the appearance of A(5) can be interpreted as:

    a) Call the function A and pass it the parameter 5.

    b) Access the 5th element of the array A by index.

    Now is there a conceptual reason for this? Can a be seen as a special case of b, or vice versa? No, because there is a clear divide between data and functions. In other words, the justification for this syntax is convenience and aesthetics. This rails against my sense of design ISSUES.

    I could continue on in this manner, but its too easy because the claim I am supporting is true.
    You seem very derogatory towards me. A compiler is a system that translates source code into machine instructions. It looks like you don't know what an interpretive compiler is, and you think compilation is all about producing executable files - that's fine, from your non-academic perspective I don't think you would be interested in an elegant system for doing lexical analysis of a small "toy" language like BASIC.
     
    Last edited: May 10, 2007
  16. May 10, 2007 #15

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    *Yawn*

    I've been programming computers for 17 years. I learned a language called HyperTalk back in the day, then moved to C, C++ (even before it became an ANSI standard). Later, I moved into Java and Perl, then Python and Ruby. I have experience in a handful of shell scripting languages, plus a number of niche languages like Tcl/Tk and PHP. (You do realize I coded all of the custom parts of this very site... don't you?)

    If you're interested to see just how much I know about "design issues" involved in programming, here's a screen shot of some of my professional work:

    http://www.virtualcivilization.org/WaveVision.jpg

    What is this, a quiz? Do you really think you're so much smarter than me that you can talk down to me? :rofl:

    Manipulating a data structure not known at compile-time?! Oh wow! What a challenge! :rolleyes: Python can. Ruby can. Get real, man. Duck-typing and weak-typing have been around for decades. You're just showing your ignorance.

    Oooh, teacher, explain to me what an expression is!

    C has some of the most archaic and unintuitive syntax on the planet. If you really think programmers think C has "cool syntax," you're clueless. There's really no better way to say this: you're clueless.

    Did you just get hit in the face with a thesaurus, or what? What's with this motivation to constantly sound superior to other people? Again, I'll ask you directly: do you think you're smarter than me? If not, drop the attitude. It's just making you look like a dweeb.

    Indeed, MATLAB's syntax is inconsistent and sometimes downright weird. That would be a major flaw, if you were to consider it a general-purpose language... except it isn't. Neither is Mathematica. If you'll note, I never said MATLAB's syntax was ideal or even aesthetically pleasing -- I only said that it's syntax is easy to pick up. Almost any newbie can read a MATLAB program and understand what's going on. Moreover, they can almost always start modifying it straight away and get something useful out of it. In a constantly-changing market with constantly-changing collaborations between different companies and different groups, this is incredibly important. It's worth it to have a messy, incosistent language sometimes, because people can immediately understand it.

    A compiler produces machine code. That's a definition. It's not my definition. It's the definition. The reason I'm calling you out is because lately all your posts seem to be is a bunch of big words and academic chest-beating interspersed with very few facts, half of which you've gotten wrong. If only your arguments were more sound, there'd be no need to inquire of you whether or not you know what a compiler is.

    And if all you're talking about is a goddamn BASIC lexer, of course I don't care! I can write that in far fewer than 20 lines using ANTLR or even flex, both of which are F-R-E-E!

    - Warren
     
    Last edited: May 10, 2007
  17. May 10, 2007 #16
    The unexamined life is not worth living. If all your experience has taught you anything, how about this: messy inconsistencies die hard.

    I am trying to talk about how a top tier product, relevant to members on this board, has under gone a dramatic upgrade to become something that is new, and I think will have an increasing impact with time. Furthermore, I am alluding to the way that the excellent design and organization of Mathematica made this upgrade possible, a milestone in the history of software progression.

    I can't discuss how smart anybody is, and I can't discuss how much experience you have, all I can discuss with you are facts and insights. I thought that this forum was not a place for personal attacks, I'm honestly hurt that you are so mean to me. You imply that you are doing a service to everyone by "calling me out".

    Edit - Just stop attacking me. I don't want any more personal attacks. If you want to have an argument (a logically connected sequence of facts intended to establish a proposition) then please begin doing so. Just cool it on the personal language, and stop attacking me.
     
    Last edited: May 10, 2007
  18. May 10, 2007 #17
    I'm sorry Chroot, its just your definition.

    Here is a definition which I prefer:

    I used the word "instructions" to mean "state". This definition does not rely on the persistence of "code" that induces this state.

    Now that you have explained that your status on these boards, I understand that I came across as insulting you, and I'm sorry. I was being genuine (as if your were any stranger) when I was "quizzing" you (not everyone who has 15 years of experience is competent, but you are the reason that these forums are some of the best on the web, transcending topics).
     
    Last edited: May 10, 2007
  19. May 10, 2007 #18

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I use Mathematica almost every single day! I'm just not so naive as to think it's the greatest programming language on the planet, or that other tools never beat it. It's a great program, and it does what it does very well. I'm looking forward to seeing Version 6.0 It just happens that there are often many other solutions that are either cheap or free, and they're worth considering.

    If all your experience has taught you anything, how about this: always begin a job by finding the best tool.

    That's the problem, Crosson -- your "facts" are things like "GUIDE requires C++" and "You could write a...compiler for a language like BASIC using less than 20 lines of Mathematica code" and "Matlab has no analogue to symbolic differential equation solving."

    These are not facts. They're not even insights. At best, they're falsehoods; at worst, they are lies.

    Now, I've been honest enough in this thread to concede when shown wrong. For example, I thought that Mathematica had no C++ interface -- I was wrong, and said so. That's all I'm asking you to do here, Crosson -- be honest enough to admit that have made false statements in this thread.

    You began the personal attacks by questioning my knowledge of computer programming, by calling me some kind of a "non-academic," etc. If a Master's from Stanford doesn't qualify me as "academic enough" in your eyes, that's fine, but I won't tolerate anyone making passive-aggressive comments belittling my experience in the world.

    Yeah, let's stop. If I could, I'd offer you a beer. I learned some things in this thread, and I just hope you did, also.

    - Warren
     
  20. May 10, 2007 #19
    Yep, that sounds about right. Cool! And as you might expect, people where I work use a lot of Fortran, too. Even F77! Fortunately, I haven't had to mess with it. :yuck:

    This is an argument I think all programmers are familiar with. But the fact is, the runtime libs do matter. Even if it's not "interesting" to you. I confess, it didn't use to interest me either, until I discovered how much it matters.

    Think about it: language itself doesn't matter. Any language that supports functions basically supports all programming paradigms automatically. It may not have some magic syntax to shave off a few characters, but you can do any style of programming in any turing-complete language. The question is, do you have to write all the libraries to do this yourself? If the answer is yes, you'll find you spend a lot more time writing all that junk than you think.

    So I would argue that it is ONLY the runtime library that matters. The syntax of the language is almost irrelevant. I found that out through experience. If you have a very complete OO-style function library and set of idioms, you feel like you're writing OO code. Even if it's in pure C. If you have a nice library of functions and a set of idioms for manipulating logic rules, you feel like you're doing logical programming.

    Syntax is hidden behind the veil of the mind's ability to think in concepts rather than keyboard characters. I think your meaning of "language" doesn't matter all that much in practice. Who the hell cares whether array indexing is parentheses or brackets?

    Yeah, OK, like Perl et al.

    Huh? Perl (famously) does this quite nicely.

    That would seem to contradict your statements of distaste about the fact that MATLAB indexes arrays and calls functions the same way. Also your unhappiness with the aesthetic inconsistency between different packages that have been bolted onto MATLAB. These things don't impact functionality, which I think was chroot's point.

    Whaaaaaaah? :bugeye:

    I've been coding in mostly C for many years and I have never heard anyone describe C's syntax as aesthetically pleasing. Never.

    What the heck are you talking about? Are you actually claiming that the human mind has infinite processing capacity for syntactic analysis? Shall I invent an insanely complex syntax just to prove you wrong? I mean come on! I think it's obvious that there's a limit to the complexity of anything (syntax or otherwise) that the human brain can physiologically deal with. I mean, even the working memory requirements alone run up against the brain's maximum working memory.

    And that's leaving aside the fact that people who write code in languages with more complex syntax, and regularly use all the available features, more frequently tend to overlook things and make errors. It's a lot easier to screw up Perl syntax in some subtle, imperceptible way than C syntax, I promise you.

    Do you mean a bytecode compiler? Are you actually talking about writing a bytecode compiler for BASIC?

    Isn't "elegant" a synonym for "aesthetically pleasing"? I always thought so. You seem to think otherwise, judging by the fact that you criticize MATLAB's practical (inelegant, unaesthetic, ugly, but functional) syntax for being inelegant.

    It seems like on the one hand, it bothers you that MATLAB's syntax is all complicated and not consistent or beautiful, but on the other hand, you make the argument that languages shouldn't be evaluated in terms of their consistency and beauty. Which is it?
     
  21. May 11, 2007 #20
    I wouldn't say that Perl fully supports functional programming, one reason being that functions in Perl are not treated as first class values the same way they are in LISP or Mathematica.

    Maybe we are talking about the same thing, maybe not. I'd study any example you provided.

    That is a judgement of what you prioritize. Instead of "don't matter" say "doesn't interest me" because it matters a lot to some people.

    I take what your saying is that for getting work done, run-time libs are most important, and I agree. Libraries are what make the world go round when I am doing work, not finding the necessary libraries just means more work, I understand.

    A different criterion for evaluating languages is based on how important it is in the long run. We all must admit that what we have now will be vastly inadequate at some point, and so studying design is important.
    No, my issue with Matlab runs much deeper then aesthetics. The issue is RELIABILITY. All programmers make mistakes, and although it is a hassle to fix those caught at compile time, in this day and age it can literally be FATAL if the error is exposed at run time.

    Thus one of the goals since the early days is to catch as many errors at compile time as possible. Suppose you make a typo when typing the call to a function, but all that happens is that you instantiate an array of garbage. This is an overly simplistic example of what can go wrong when you have something like A(5).

    My problem with the "bolt on packages" is the lost oppurtunity for an orthogonal design that they cause, and that is a design issue, not aethetics. Aesthetics is about visual appeal, but there are many other more important design issues for syntax.

    Only the runtime libs matter to you, for what you do. For what you do, the syntax of the language is irrelevant. Thats what you found from your experience. Like I said, some people spend their careers working on these design issues, so it is not irrelevant.

    No, I'm not. I am refering to a compiler in the sense of my previous post, in this case an interpreted compiler.

    Our brains are very powerful; they interpret raw sensory data, which is a syntax more complex than any that has been constructively imagined.

    I agree, my aesthetic feeling towards perl is that its 'loose'. This is a very important argument against complexity, and I think Mathematica attempts to solve this issue, but of course does not entirely succeed.
    I use elegant as one would refer to a clever mathematical proof as elegant. Within limits, this is independent of notation. Non-elegant programs typically overspecify tasks, and elegant programs read more similarly to natural language instructions. Think of using subprocedures to improve the understandibility of a program, some ways are more elegant than others i.e. a few subprocedures that work together well vs. many highly independent and special case functions.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Mathematica 6.0 Changes Everything
  1. Mathematica 6.0 (Replies: 1)

Loading...