[Haskell-cafe] Python?

Michael Vanier mvanier at cs.caltech.edu
Wed May 11 18:59:16 EDT 2005


> Date: Wed, 11 May 2005 13:06:51 +0200
> From: Jerzy Karczmarczuk <karczma at info.unicaen.fr>
> 
> Michael Vanier comments my defense of Matlab:
> 
> >>I used objects, and even a lot of functional
> >>constructs. I don't see any reason to call it a creeping horror.
> >>It is quite homogeneous and simple, and is decently interfaced.
> >>
> >>    
> >>
> >
> >It's incredibly inconsistent.  To cite just one example, the syntax is
> >geared towards the notion that "everything is a two-dimensional matrices of
> >double-precision floating point numbers".  If you want to have a
> >three-dimensional array, you can do that, but the syntax is not going to be
> >nearly as elegant, because matlab's array syntax doesn't scale at all.  
> >
> Come on...
> Matlab has cells and the full object-oriented layer nowadays. There
> are short ints, strings, complex numbers, etc. The extensibility is
> good. The overall consistency is reasonable.
> 
> Syntax for 3D arrays?
> Give me one single language where this is natural and immediate.
> We are 2D readers/writers, our way of presenting information is
> 2D within a text editor, and similar problems hit everywhere. I used
> 3D matrices for the image synthesis, for colour  image processing,
> for simulations of physical systems. It wasn't worse, and even better
> than in many other languages.

Python:

# 2-d array:
print a[0][0]

# 3-d array:
print a[0][0][0]

This also applies to most languages, including C.

If you like matlab, go right ahead and use it.  The same goes for Visual
Basic.  I could care less what programming languages you use.  But if you
think matlab is an elegant language, we will have to agree to disagree.
And that is the last word I will say on this subject, since this is a
Haskell mailing list.

Mike



More information about the Haskell-Cafe mailing list