From: Tom <tom7ca@yahoo.com>
To: Pal-Kristian Engstad <mrengstad@yahoo.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Caml productivity.
Date: Sun, 21 Jul 2002 23:41:58 -0700 (PDT) [thread overview]
Message-ID: <20020722064158.74336.qmail@web11907.mail.yahoo.com> (raw)
In-Reply-To: <20020715212251.19685.qmail@web13302.mail.yahoo.com>
> Some proponents of this mailing list seem to be
> convinced that Ocaml is so much more productive than
> C++.
It is. For many problems. Yours may not be one of them.
> I find this to be a terrible mistake.
The terrible mistake is thinking that there is one programming
language that works really well for everything. There isn't.
There never will be because it's a logical impossibility.
> From an
> industry where performance is crucial (games
> programming), I find quite a few aspects of Ocaml hard
> to unify with productivity.
That's a silly generalization. There are many excellent
games that do not require high performance computing in
any form.
However, even those games that do require high-performance
computing (say, for 3D graphics or AI) can generally be
partitioned into a small computational kernel and a large
set of high-level constructs. And you don't even have
to reinvent the wheel--many such kernels alreay exist
and are easy to hook up to OCAML: BLAS, LAPACK, OpenGL,
various game and object graph libraries (CrystalSpace, etc.),
neural networks, and many others.
Many high-performance games are programmed in an interpreter
coupled to a bunch of those libraries. OCAML gives you a leg up
because of better compile-time type checking, a good foreign
function interface, and the ability to do modestly high
performance computing in OCAML itself in a pinch.
Two specific points:
> 6. The non-obvious behavior of garbage collection.
Anything you don't understand is "non-obvious". However,
GC is no more "non-obvious" than manual storage allocators:
you have to learn how to write high performance code in
either of them. GC'ed languages are different: what
you are used to in C/C++ will not work well. (That is
not to say that the OCAML collector couldn't be improved
for soft real time problems.)
> As an example, imagine that you want to define:
> [packed data structure layout example follows]
Yes, control over layout is nice for high performance
computing. It could be added to OCAML. Are you volunteering?
Note, incidentally, that neither C nor C++ make a lot of
actual guarantees about layout of data in memory; code
that actually depends on it is, in most cases, unportable.
Some compilers will even change layout under different
optimization options, so beware.
C and C++ are great languages. I write a lot of C++
code. But C and C++ should really be considered niche languages,
for specific, low-level system tasks, computational kernels,
or certain high-performance numerical uses. Most code people
write in C or C++ (GUI software, many games, etc.) would be much
better, and more productively, written in something else.
Tom
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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
next prev parent reply other threads:[~2002-07-22 6:42 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-15 21:22 Pal-Kristian Engstad
2002-07-20 15:16 ` William Chesters
2002-07-22 18:22 ` Pal-Kristian Engstad
2002-07-22 18:41 ` achrist
2002-07-22 19:23 ` Pal-Kristian Engstad
2002-07-22 21:13 ` [Caml-list] CamlIDL and function pointers Michael Tucker
2002-07-23 8:39 ` Xavier Leroy
2002-07-23 13:11 ` Dmitry Bely
2002-07-24 15:00 ` Michael Tucker
2002-07-25 9:36 ` Xavier Leroy
2002-07-22 21:26 ` Games (Re: [Caml-list] Caml productivity.) Oleg
2002-07-23 2:56 ` Issac Trotts
2002-07-23 11:03 ` eijiro_sumii
2002-07-23 16:17 ` Charles Martin
2002-07-29 3:36 ` Andrei de A. Formiga
2002-07-29 6:32 ` Florian Hars
2002-07-29 10:23 ` eijiro_sumii
[not found] ` <001901c237a7$9e685920$890bfea9@mimbi>
2002-07-30 4:52 ` eijiro_sumii
2002-07-30 18:13 ` Jonathan Coupe
2002-07-30 6:16 ` eijiro_sumii
2002-08-01 15:39 ` John Max Skaller
2002-08-01 15:59 ` Markus Mottl
2002-08-01 16:28 ` Jonathan Coupe
[not found] ` <86vg6ta9o6.fsf@laurelin.dementia.org>
2002-08-02 12:50 ` Jonathan Coupe
2002-08-02 14:51 ` John Max Skaller
2002-07-25 3:19 ` Chris Hecker
2002-07-28 13:45 ` Jonathan Coupe
2002-07-29 0:57 ` Michael Vanier
2002-07-22 22:00 ` [Caml-list] Caml productivity Alexander V.Voinov
2002-07-20 15:25 ` Oleg
2002-07-22 6:41 ` Tom [this message]
2002-07-22 10:46 ` Nicolas Cannasse
2002-07-22 17:46 ` Pal-Kristian Engstad
2002-07-24 3:20 ` Travis Bemann
2002-07-24 9:45 ` Pal-Kristian Engstad
2002-07-26 21:42 ` Chris Hecker
2002-07-27 4:41 ` Issac Trotts
2002-07-27 5:49 ` Chris Hecker
2002-07-27 14:49 ` John Max Skaller
2002-07-27 9:06 ` Oleg
2002-07-27 18:18 ` Chris Hecker
2002-07-29 8:13 ` Nicolas Cannasse
2002-07-30 4:46 ` Travis Bemann
2002-07-24 8:02 ` Nicolas Cannasse
2002-07-24 8:25 ` Jérôme Marant
2002-07-24 10:00 ` Pal-Kristian Engstad
2002-07-27 9:06 ` Oleg
2002-07-23 2:08 Arturo Borquez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020722064158.74336.qmail@web11907.mail.yahoo.com \
--to=tom7ca@yahoo.com \
--cc=caml-list@inria.fr \
--cc=mrengstad@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox