This is getting OT, but I'd kind of like to see it get archived somewhere...

João Luís Silva wrote:
> I'm trying to explore new options, and learn new skills. My favorite 
> programming languages are C/C++ and Python. I use Python for small 
> scripts and applications, and C/C++ for everything else. I've started a 
> smallish/medium size open source app in python+pygtk+matplotlib+numpy 
> (laserfoam.sf.net) but I think a large application might be more 
> maintainable in C++.

I think this is not true AT ALL -- C++ is a big 'ol mess and far too 
complicated, and not very flexible, no matter how hard it tries.

> Also, I think C++ is easier to "sell" to the powers 
> that be.

That can be quite true, depending on who the powers that be are. 
However, I like a quote from the wxPython list:

"The only difference that my users see between an app written in Python 
and C++ is that the Python one has more features...and fewer bugs."

> I may write the GUI in 
> python+wxPython, and everything else in C++,

I wouldn't write "everything else" in C++ -- I'd only write what you 
really need to write in C++ - which means only computational code that 
isn't fast enough with numpy, or device drivers or something like that.

> but I was trying to drive  the app from C++.

That can be done, but most people do it the other way around, it's 
easier to drive C++ from python than python from C++. I did get a note 
on the numpy list from someone driving MPL from C++ for some simple test 
code, but I don't think it's a robust solution -- I've just forwarded 
that to you.

> The need for python only remains due to its superior 
> plotting tools.

the "need" maybe, but python has many, many, advantages that have 
nothing to do with plotting (or other libs, though the available libs 
are a big plus). Really, you'll be writing 1/5 to 1/10 as much code -- 
that's a BIG savings!

Also, you get built-in scripting -- and I think virtually every app 
should be scriptable.

> Also, I'm trying to keep things simple, so that they 
> just work, on both Linux and Windows.

If you keep your extensions pretty standard C++, that's pretty easy, and 
python + wxPython is very portable.

> I guess I have to think this over a bit more. Any further comments or 
> sugestions would be appreciated.

Here's the key questions:

1) do you need C/C++ at all? maybe not!

2) If so, how much of the functionality of your app really needs to be 
written in C++? Multi-language development is kind of a pain -- SWIG, 
Pyrex, ctypes, Boost++, etc help a lot, but it's still a lot of work at 
the interface, so it only makes sense if you keep that interface small. 
If there isn't much C++, it's a no-brainer.

3) it seems most projects that do python+C++ development wish they'd 
done more in Python, not less:

http://www.python.org/about/success/wingide/


Why do you think that virtually no one writes web apps in C++?

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to