<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/1ba7258845ed8bd9491c0456e7a05b1e"
  from="Pal-Kristian Engstad &lt;mrengstad@y...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-20T13:48:44"
  subject="[Caml-list] Caml productivity."
  prev="2002/07/cc062fa54b78609497f3080c5331c9a1"
  next="2002/07/ed6e258ddd3082e1de940b5ff3b369ea"
  next-in-thread="2002/07/509362a68506d7ed09d0be89b9c9e4f6"
  prev-thread="2002/07/71c26b67baafe720885c555fc4a75f00"
  next-thread="2002/07/ed6e258ddd3082e1de940b5ff3b369ea"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Caml productivity.">
<msg 
  url="2002/07/1ba7258845ed8bd9491c0456e7a05b1e"
  from="Pal-Kristian Engstad &lt;mrengstad@y...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-20T13:48:44"
  subject="[Caml-list] Caml productivity.">
<msg 
  url="2002/07/509362a68506d7ed09d0be89b9c9e4f6"
  from="William Chesters &lt;williamc@p...&gt;"
  author="William Chesters"
  date="2002-07-20T15:14:05"
  subject="[Caml-list] Caml productivity.">
<msg 
  url="2002/07/141365db2b93dfaff20df60620a672c4"
  from="Pal-Kristian Engstad &lt;engstad@n...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-22T18:08:37"
  subject="RE: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/70d8fb7b01ce74769871069813828d50"
  from="achrist@e..."
  author="achrist@e..."
  date="2002-07-22T18:40:54"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/1929e85adb2dce6bd413f9c176c9d282"
  from="Pal-Kristian Engstad &lt;engstad@n...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-22T19:08:59"
  subject="RE: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/a479967b0001a3186b117aad08de5bf4"
  from="Michael Tucker &lt;mtucker@e...&gt;"
  author="Michael Tucker"
  date="2002-07-22T21:13:43"
  subject="[Caml-list] CamlIDL and function pointers">
<msg 
  url="2002/07/78b04a2826c047ba4cdd21788624fcae"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-23T08:39:19"
  subject="Re: [Caml-list] CamlIDL and function pointers">
<msg 
  url="2002/07/a7e0cdd9dfa5e79f251fa9a3482ba382"
  from="Dmitry Bely &lt;dbely@m...&gt;"
  author="Dmitry Bely"
  date="2002-07-23T13:15:38"
  subject="Re: [Caml-list] CamlIDL and function pointers">
</msg>
<msg 
  url="2002/07/c7b19622fa8d83e32adb0e632a0eb2ae"
  from="Michael Tucker &lt;mtucker@e...&gt;"
  author="Michael Tucker"
  date="2002-07-24T15:00:58"
  subject="Re: [Caml-list] CamlIDL and function pointers">
<msg 
  url="2002/07/c80262d8a5079c5a0ef409a674edce6f"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:36:15"
  subject="Re: [Caml-list] CamlIDL and function pointers">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/07/e3ce9c7cf91bf6db61d44124f79a98f5"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-22T21:24:19"
  subject="Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/8a5ec6fb7a11d61c196ce24b8ffb906d"
  from="Issac Trotts &lt;issac@m...&gt;"
  author="Issac Trotts"
  date="2002-07-23T02:57:07"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/e42b072cfbe92ebadd7aa6957e1eab4f"
  from="eijiro_sumii@a..."
  author="eijiro_sumii@a..."
  date="2002-07-23T11:03:32"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/7c0a72b352be55944287390245b75756"
  from="Charles Martin &lt;caml.list@g...&gt;"
  author="Charles Martin"
  date="2002-07-23T16:17:12"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
<msg 
  url="2002/07/9922f6f9613f2b6e0ba1c17ad7d199fd"
  from="Andrei de A. Formiga &lt;andreif@i...&gt;"
  author="Andrei de A. Formiga"
  date="2002-07-29T03:33:30"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/7d49d2bb4f0f8d0da011582d590f1f5d"
  from="Florian Hars &lt;florian@h...&gt;"
  author="Florian Hars"
  date="2002-07-29T06:33:15"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
<msg 
  url="2002/07/ffef81171738879a74f9340fe64c5163"
  from="eijiro_sumii@a..."
  author="eijiro_sumii@a..."
  date="2002-07-29T10:23:23"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/e5ad30ad3d085e195c5e4d8b7ad94acd"
  from="eijiro_sumii@a..."
  author="eijiro_sumii@a..."
  date="2002-07-30T16:50:19"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/25f7863b64a6f6263bbd7d137a563d91"
  from="Jonathan Coupe &lt;jonathan@m...&gt;"
  author="Jonathan Coupe"
  date="2002-07-30T18:08:36"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/08/43f12f51de81c774b505f143cf807619"
  from="John Max Skaller &lt;skaller@o...&gt;"
  author="John Max Skaller"
  date="2002-08-01T15:39:57"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/08/0052e34d5ed2c650be1c71bf603dfd84"
  from="Markus Mottl &lt;markus@o...&gt;"
  author="Markus Mottl"
  date="2002-08-01T16:00:17"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
<msg 
  url="2002/08/fb054c8450791b2ff36f144d26f6ad13"
  from="Jonathan Coupe &lt;jonathan@m...&gt;"
  author="Jonathan Coupe"
  date="2002-08-02T09:02:46"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/08/d0fd4f4b272f5851effd2c41d20936c3"
  from="Jonathan Coupe &lt;jonathan@m...&gt;"
  author="Jonathan Coupe"
  date="2002-08-02T12:44:46"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
<msg 
  url="2002/08/93c02d1b6710aa1b7b69bd8f3f88181b"
  from="John Max Skaller &lt;skaller@o...&gt;"
  author="John Max Skaller"
  date="2002-08-02T14:51:20"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/212b6a76b1fb65f098665099a02647f7"
  from="eijiro_sumii@a..."
  author="eijiro_sumii@a..."
  date="2002-07-31T01:11:47"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/07/d13acda5053494df37964bb408085bad"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-25T03:23:14"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/fd3e6d80be919abc06bcfd0ee2ffadda"
  from="Jonathan Coupe &lt;jonathan@m...&gt;"
  author="Jonathan Coupe"
  date="2002-07-28T13:40:44"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
<msg 
  url="2002/07/0c819bf6e19d28995f6ef2036db39e5f"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-29T15:49:35"
  subject="Re: Games (Re: [Caml-list] Caml productivity.)">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/07/7e19da946c160f365e8f4fe6773374dd"
  from="Alexander V.Voinov &lt;avv@q...&gt;"
  author="Alexander V.Voinov"
  date="2002-07-22T22:06:37"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/e6c3d1cb6aed17c094cbe8798d5b73e9"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-20T15:24:38"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
<msg 
  url="2002/07/7a65a2a07ceccfa4e53d0f1c228dbd4f"
  from="Tom &lt;tom7ca@y...&gt;"
  author="Tom"
  date="2002-07-22T06:42:01"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
<msg 
  url="2002/07/9ce195764ef654a5dfb7205f3c85a290"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2002-07-22T10:47:05"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/c1d27612820e9d845f7a8b7c0a41d2aa"
  from="Pal-Kristian Engstad &lt;mrengstad@y...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-23T20:56:10"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/0c313e90b642f8f12bb25f25ea9fbcfd"
  from="Travis Bemann &lt;bemann@e...&gt;"
  author="Travis Bemann"
  date="2002-07-24T04:20:33"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/5d55e595caac57c62e5dc2e86b63de1e"
  from="Pal-Kristian Engstad &lt;mrengstad@y...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-26T21:07:18"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/b212f6e35c549581b16b6624a1a56abb"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-26T21:46:45"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/d7dbdd3a140874d79a422a0b80cbdf63"
  from="Issac Trotts &lt;issac@m...&gt;"
  author="Issac Trotts"
  date="2002-07-27T04:42:05"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/522d76f4ddafad8c4f1e0778ad37a4f1"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-27T05:53:17"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/c2850575bbf44763e83d5c50f6d5159b"
  from="John Max Skaller &lt;skaller@o...&gt;"
  author="John Max Skaller"
  date="2002-07-27T14:49:36"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/251d81ff74aa60825afd904604b8c5d3"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-27T09:06:23"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/1965eaa1e57e08ccf423e4415d99cd48"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-28T00:10:49"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
</msg>
</msg>
<msg 
  url="2002/07/12e4dec5bbe67f35890781b7b85d03ce"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2002-07-29T08:13:59"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/53a818fc3a885dc850b4e8564b4c81f4"
  from="Travis Bemann &lt;bemann@e...&gt;"
  author="Travis Bemann"
  date="2002-07-30T05:46:54"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2002/07/b94153a499cfb8e624d1b8a1e738c808"
  from="Nicolas Cannasse &lt;warplayer@f...&gt;"
  author="Nicolas Cannasse"
  date="2002-07-24T08:02:55"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/d8be09893e051cef83916581376ca7b6"
  from="Jérôme_Marant &lt;marant.logatique@f...&gt;"
  author="Jérôme_Marant"
  date="2002-07-24T08:28:04"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
<msg 
  url="2002/07/0d311d854b7f7713630895700b3b416b"
  from="Pal-Kristian Engstad &lt;mrengstad@y...&gt;"
  author="Pal-Kristian Engstad"
  date="2002-07-26T21:06:52"
  subject="Re: [Caml-list] Caml productivity.">
<msg 
  url="2002/07/e80e9e57f434ec7a846466c3cb92003c"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-27T09:06:15"
  subject="Re: [Caml-list] Caml productivity.">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Some proponents of this mailing list seem to be
convinced that Ocaml is so much more productive than
C++. I find this to be a terrible mistake. From an
industry where performance is crucial (games
programming), I find quite a few aspects of Ocaml hard
to unify with productivity.

There is something to be said for syntax. Syntax
should help the programmer, not the compiler. In
games, it is standard to have a huge library of
classes dealing with mathematical concepts. A minimum
requirement is support for matrices, vectors,
quaternions and splines. This usually also entails
inline assembly, taking advantage of SIMD instruction
sets. Operator overloading is very important to games
programmers, especially for AI and behavior code.

Here is a short list of items that I’ve found
illogical and inconvenient for C/C++ programmers in my
field:

1. The lack of operator overloading, especially
floating-point operations.
2. The lack of bit-fiddling operations.
3. The lack of inline assembly constructs.
4. The non-obvious layout of variables (essential for
optimized functions).
5. The non-obvious differences between arrays and
“inline” arrays.
6. The non-obvious behavior of garbage collection.

One has to understand that when performance is
super-important, one cannot just rely on the compiler
anymore. Some sections of the code have to be
optimized by hand, and it is here that Ocaml falls
short of C/C++. 

As an example, imagine that you want to define:

struct Elems {
	u32 handle;
	u16 numData;
	u16 index;
};

struct Data {
	Elems elem[128];
	u8 buffer[16 * 1024];
};

Data *data = (Data *)0xabadbeef;

This is a very clear layout. One wants the data in a
very specific memory configuration. One needs to know
the exact sizes of the data structure. This could for
instance map to special hardware that is laid out in
this way. This is impossible to do with Ocaml.

Now, Ocaml is a great language for some tasks. I’ve
successfully used it with Facile, a constraints
solver. The parsing of the input was a breeze compared
to a similar C/C++ solution. But one can’t go around
claiming that Ocaml is a productivity enhancer for all
tasks. Games programming certainly isn’t one of them.

PKE.



__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

