Sorry if this has already been discussed somewhere, but I couldn’t find it searching.
On Mon, Aug 4, 2008 at 2:59 AM, Roth Michaels
> Sorry if this has already been discussed somewhere, but I couldn’t find it
> I know in general the same action coded in C versus Max will be faster in C
> and that because of the JVM, C will be faster than Java. I was wondering if
> similar tasks. I know I’ve had some ideas that would be easier to code
> language to write an object in (if you can’t tell, I have some background in
For starters I have to say I’m not as experienced with Java as I am with
C/C++ so that’s likely to make my opinion more biased than needs to be.
Apart from what language you prefer to work with, I think the right choice
depends on what kind of processing you’re doing. Java can be pretty equal to
C in terms of speed, as long as you don’t frequently have to cross the Max/C
< -> JVM boundary, cause that’s relatively expensive. If you write externals
that do a lot of i/o or number crunching, C will probably be faster by a
I don’t use Java because I personally don’t like the language and prefer to
have full control over things like memory management. Also I don’t have a
use for the extensive library that often makes Java a popular choice. I do
like to work with classes and inheritance and all that, so that’s why I use
C++ for most of my externals now, using variations on Graham Wakefields
to have replaced all that with Lua. I don’t think I’ll ever look back:) I
times. I won’t use it for anything other than very basic scripts /
The choice is really yours to make, and I don’t want to start a heated
language discussion (you can find plenty of Java vs C etc discussions
online) but my personal choice would be:
- High performance code without compromise: C/C++.
alternatives that I don’t have any experience in (lisp?, etc). Possibly
there will be a Lua option for this in the near future.
- Anything OpenGL / Jitter : jit.gl.lua.
- There is also the option to use Lua for audio/synthesis: lua~
If you’re coding less speed/time critical things, and you find good use for
the extensive Java libraries, go for that if you can be bothered to learn
I choose to focus on C/C++ and Lua. One for ultimate performance and the
other for dynamics / flexibility and ease of use. They are both very good at
what they’re designed for, complement each other nicely, and also play well
together. With these languages I currently don’t feel a need for anything in
between. For me Java is something halfway in between performance and
flexibility. I guess some might argue that’s a strong point.
It will take some time and effort to become really comfortable with C/C++
and the Max SDK (I expect the upcoming Max5 SDK might simplify certain
things a bit), but once you’re there it can be fairly easy and fast to code
externals. Of course your mileage may vary.
If you’re mainly working on Mac you can also look into the ObjC framework
Tim Place just released. I don’t have enough experience with ObjC to make
any claims about it but it certainly looks interesting to me. Afaik you can
compile externals written in ObjC for Windows as well.
I would be interested on more feedback on this subject
I’m not sure which part of the thread you are interested in, but I can comment on one thing Thijs said. ObjC on Windows is a total disaster. I can’t recommend against it strongly enough. I wasted a lot of time on that, so now you don’t have to ;-)
Forums > Dev