Elements of comparison Java/Hotjava vs. Caml/MMM

Preliminary word: this comparison may not be fully objective. I appreciate your comments

Java and HotJava are trademarks of Sun Microsystems, Inc.

Introduction

HotJava is to Java what MMM is to Caml, that is:

Java applets are also supported by several other Web browsers. Caml applets are supported by the Netscape Navigator 3.0 through the Calves plugin.

This documents briefly discusses the following topic:

  1. The languages Java and Caml
  2. Typing in the languages
  3. Security in the applet systems
  4. Portability
  5. Libraries accessible through applet APIs
  6. Availability

The languages: Java and Caml

Java
Caml (Objective Caml)

Typing

Both languages are typed, meaning that no type error goes undetected.
Java
Caml

Security

Both languages make heavy use of typing to enforce security. The main difference in that Java uses typing at the bytecode level whereas Caml uses compile-time type-checking, complemented by cryptographic authentication.
Java applets
Caml applets
The instructions of the abstract machine do not contain type information. But, on the other hand:

Portability

Applets themselves are portable. The topic discussed here is the portability of the runtime environment.
Java runtime
Preliminary comment: a Java runtime is composed of a interpreter for the Java Virtual Machine and an implementation of native libraries (system calls, AWT, ...). There exists several implementations of the JVM; the status of native libraries is not clear.

From JavaSoft, the JDK is currently available for: Solaris, Windows 95/NT, MacOS (depending on JDK versions). The JDK is also available for Linux from Blackdown. OSF has announced projects for porting Java to major Unix platforms. Ports for major Unix platform are proposed by third-parties.

It should also be noted that Netscape Comm. has apparently ported the Java runtime to several Unix platforms, since Java is supported (or will be supported) by Mozilla on most platforms.

Caml runtime
The Objective Caml (bytecode runtime) is available for (or portable to) any Unix platform (that is: POSIX-compliant operating systeme and ANSI compliant C compiler). Examples: Digital Unix, SunOS, Solaris, FreeBSD, Linux, MkLinux, NextStep, IRIX, Ultrix, HPUX, AIX (see full list).

Ports to Windows and Mac OS are also available. Porting the MMM browser would require some additionnal work, but is theoretically possible (because Tcl/Tk is now available on these platforms).

Libraries

This section discusses the libraries available to the applet author.
Java applets
Caml applets

Availability

Java, Hotjava, Netscape
Hotjava is freely available, but supports only the obsolete Java alpha API. Netscape distribution policy varies according to the user status. The Java specification is proprietary but freely available. The sources of the system are available under license. A Java compiler is freely available.
Objective Caml, MMM.
All sources available freely. Both systems are freely usable, but derivative work is subject to permission.