[ocaml-biz] C++ migration

Brandon J. Van Every vanevery
Mon Aug 30 03:45:20 PDT 2004


Brian Hurt wrote:
>
> The first language I'd like to see Ocaml defeat is Open Source C++.

Making SWIG's OCaml support really kick ass would be a handy way to do
that.  The best way to defeat C++ is to interop with it and migrate out
of it.  http://www.swig.org

I have resisted this problem for a long time, because it promises to be
a lot of work.  I've hemmed and hawed about writing OCaml support for
The Nebula Device, a MIT-style licensed 3D engine written in C++.
http://nebuladevice.cubik.org  An OCaml-oriented 3D engine could be the
next open source killer app.

A difficulty, however is the Nebula developers aren't oriented towards
any particular language, and they don't like SWIG.  They have their own
homebrew 'script server'.  Given a Nebula-centric world view, it's
actually not a bad idea, as it's less complicated than dealing with
SWIG.  However, it really doesn't seem to be designed for heavy duty
performance, only for scripting.  The glue code looks like it's slow,
there's a lot going on with it.  The Nebula developers have a split
language mentality.  "C++ for performance, whatever scripting language
you want for flexibility."  They probably won't change their ways.
Aside from this approach being a common game industry practice, you've
got the ego of the Nebula developers to consider.

So, a truly OCaml-oriented 3D engine may require a code fork.  Given the
likelihood of a fork, I've wondered about the wisdom of building on top
of a C++ DirectX oriented engine in the 1st place.  On the other hand,
this is a real commercial engine.  Writing 3D engines from scratch is a
PITA, at least if you're trying to be general purpose and not just quick
and dirty for your own needs.

I floated the idea of an OCaml 3D engine on the ocamlgames mailing list
and got no response.  I'm currently looking at some guy's code, he has
some pieces of an engine.  It's not terribly complete yet though, and it
doesn't build easily.  http://sourceforge.net/projects/ocalibs/  Also
again it is DirectX oriented.  If the strategy is to take over open
source land, it has to be OpenGL.


Cheers,                         www.indiegamedesign.com
Brandon Van Every               Seattle, WA

"We live in a world of very bright people building
crappy software with total shit for tools and process."
                                - Ed Mckenzie




More information about the Ocaml-biz mailing list