caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: Alwyn Goodloe <agoodloe@gradient.cis.upenn.edu>
Cc: A Joseph Koshy <koshy@india.hp.com>, caml-list@inria.fr
Subject: Re: [Caml-list] embedded caml?
Date: Tue, 13 Nov 2001 21:26:18 +0100	[thread overview]
Message-ID: <20011113212618.A24821@pauillac.inria.fr> (raw)
In-Reply-To: <Pine.GSO.4.33.0111111239240.12309-100000@gradient.cis.upenn.edu>; from agoodloe@gradient.cis.upenn.edu on Sun, Nov 11, 2001 at 12:43:09PM -0500

>   You are probably right BUT many embedded environments are approaching
> what you describe. J2ME for example is intended to run in such an
> environment. I've always said anything that Java can do OCAML
> can do faster with less resources. Also note that OHaskell also
> seems intended for similar apps. Seems like OCAML would work
> just as well.

This is probably getting off-topic for this list.  At any rate, I have
some experience working with smart cards, which are fairly small
embedded systems (a state-of-the-art smart card has an 8-bit
processor, 5 Mhz clock, 2K RAM, 16K EEPROM, 64K ROM), and I can say
with some confidence that all the system you mention (J2ME, etc)
definitely do not fit in such a small embedded system.

Like OCaml, J2ME won't work well unless you have a 32-bit processor
and a few hundred K of RAM.  For Java, it's a big improvement over the
regular JDK implementation, which requires a few megabytes of RAM just
to start up.  But viewed from a Caml standpoint, it basically took Sun
5 years to shrink their JVM to the point where Caml Light and OCaml
have been since the beginning.  Don't be fooled by their marketing.

For smaller systems such as smart cards, Sun had to develop Java Card,
which is a much smaller subset of the JVM, where they throw out
garbage collection, threads, floating-point arithmetic, long integers,
and about 95% of the Java standard library.  With these drastic cuts,
it fits on a smart card, but programming in Java Card is definitely
much lower-level than in full Java, and the benefits of using Java in
this context, as opposed to (say) UCSD Pascal, are not obvious.

So, I stand with my claim that if the original poster is interested in
embedded systems that do not have a 32-bit processor and at least a
few hundred K of RAM, then Caml is not appropriate, and C might remain
his best bet.

This said, there are plenty of bigger embedded systems where OCaml
could make sense.  PDAs are a well-known example; network routers are
another.  Heck, even the electronic ignition system in your car
probably consists in a PowerPC with a few megabytes of RAM.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-13 20:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-08  6:17 A Joseph Koshy
2001-11-08  7:25 ` SooHyoung Oh
2001-11-08 11:30 ` Christopher Quinn
2001-11-11 17:20 ` Xavier Leroy
2001-11-11 17:43   ` Alwyn Goodloe
2001-11-13 20:26     ` Xavier Leroy [this message]
2001-11-15  8:33       ` [Caml-list] [Summary] " A Joseph Koshy

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=20011113212618.A24821@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=agoodloe@gradient.cis.upenn.edu \
    --cc=caml-list@inria.fr \
    --cc=koshy@india.hp.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;
as well as URLs for NNTP newsgroup(s).