[GD-General] Objective Caml (was Ruby opinions)
Brought to you by:
vexxed72
|
From: Patrick M D. <pa...@wa...> - 2001-12-23 21:30:36
|
On Sat, 22 Dec 2001, Brian Hook wrote:
> Oh, and if anyone has opinions on BETA or OCaml, I'm all ears =)
Sure, I'll be an OCaml advocate for you. I've been using it for years and
feel I had a good understanding of its strengths and weaknesses. Here are
some high-level points:
- Excellent performance of runtime code and garbage collector
- Unifies many programming paradigms in a single language:
object-oriented, functional, traditional imperative
- Compilation times are fast and provide good diagnostic feedback
- Code is very portable between Windows and Unix
- Debugger supports replay functionality
- More 3rd party libraries than similar languages (e.g. Haskell/Clean)
- Powerful type-inference mechanism eliminating the need for most
type annotations
- Strict type-checker to catch many errors at compile time
Some specific points about the language:
- First class functions - kind of like inner classes in Java but
syntax is very lightweight and easy to use
- Support for parametric polymorphism (extensional polymorphism
is in the works)
- Easy to define new data types and operate on them via pattern matching
(a generalized case statement that allows arbitralily deep
introspection)
- Exceptions
- Sophisticated module system including functors (a simple lamba
calculus on modules to support paramterization)
- OO framework with support for multiple inheritance, binary methods,
and functional updates
I'm not particularly interested in entering a debate over which language
is better -- that's very much a personal choice. Personally, I have a
strong mathematical background and appreciate formalism and notation.
For that reason, Haskell is in many ways a more attractive language to me.
However, OCaml still remains my language of choice for any serious
development work.
Patrick Doane
|