Developing Applications With Objective Caml 243
Developing Applications With Objective Caml | |
author | Emmanuel Challoux, Pascal Manoury, and Bruno Pagano |
pages | 742 |
publisher | O'Reilly France |
rating | 8/10 |
reviewer | William D. Neumann |
ISBN | 2841771210 |
summary | A comprehensive book on Objective Caml, covering not only the core language, but also modules, objects and classes, threads and systems programming, and interoperability with C. |
The Book
The book itself is quite comprehensive, clocking in at over 700 pages and covering material ranging from an introduction to the language to concurrent and distributed programming. To organize all of this material, the book is broken into four main sections that build upon each other. Each section has a set of chapters that present some related concepts, followed by an "Applications" chapter that uses those concepts to create a few small applications such as a minesweeper game, a graphical interface library, a couple of different two-player games, a distributed robot simulation, and a basic HTTP servlet. These four sections are as follows:
I. Language Core
This section serves primarily as an introduction to the OCaml language, with chapters on the functional core and imperative aspects of the language, a chapter on the differences between the two styles that shows how the two can be melded, and a chapter on the OCaml Graphics module. The introduction to OCaml is complete enough that anyone with a background in programming should be able to achieve a good understanding of the basics of the language. Especially when combined with other freely available resources, like Jason Hickey's Introduction to Objective Caml , and Richard Jones' Learning OCaml for C, C++, Perl and Java programmers, one should be able to obtain a strong OCaml foundation to use while reading the rest of this book.
II. Development Tools
The second section covers, as the title states, the OCaml development tools. The chapters in this section provide information on the OCaml compilers, interpreter, and interactive toplevel environment; some of the libraries included with the standard distribution; OCaml's garbage collection mechanism; Ocaml's debugging and profiling tools; OCaml's versions of lex and yacc; and interfacing OCaml with C. This is perhaps the most valuable section of the book, as it provides good coverage of some important topics that are covered a bit too briefly in the OCaml manual.
III. Application Structure
This section covers the OCaml Module system, and its interface and functor (parameterized module) facilities. Also included in this section is a well written chapter on object oriented programming in OCaml, and a chapter comparing the two models of program organization, offering a brief look at how the two systems can be combined to reap the benefits of both.
IV. Concurrency and Distribution
The final section covers the topics that many folks might consider to be the "real world" programming topics: File I/O, process management and communication, concurrent programming using threads, and distributed programming. The coverage in this section is, again, well done, but perhaps a bit light, and it would have been nice to see more time spent on this subject matter. However, the book is already quite hefty, and the services provided by OCaml's Unix module should look familiar enough to most programmers that the material that is presented should be sufficient to get a competent programmer up and running.
The Upshot
For the most part, Developing Applications With Objective Caml does a very good job at presenting the OCaml language in more of a "practical" light than other books on languages in the ML family (and functional languages in general). And while the applications that are constructed throughout this book aren't anything particularly great or interesting in and of themselves (a simple BASIC interpreter, a rudimentary database, a client-server toolbox, etc.), they aren't the primary purpose of the book. What the applications are used for is to illustrate how the concepts presented earlier in the book are used in within the framework of an application, and not just as isolated examples. This is especially important, as most people who might read the book will be unfamiliar not just with Objective Caml, but with the entire functional programming paradigm. Repeated exposure to working OCaml code helps to familiarize the reader with functional programming and OCaml idioms while reinforcing the book's material.There are, of course, some problems with the book. For one thing, Developing Applications is nearly five years old, half a lifetime when dealing with most computer related topics. This issue is first brought to light in the introduction where it's mentioned that chapter one tells how to install version 2.04 (OCaml is currently at version 3.08), and then in chapter one, when the reader is warned that, "Objective Caml only works under recent versions of Windows : Windows 95, 98 and NT." Fortunately, the information presented about the language remains valid (and Appendix B presents some of the features added to the language by version 3.04, the release that was current at the time of the translation). There are also a few spots where the code in the book contains minor errors, but both of these issues can easily be overcome with the help of the resources listed earlier in this review, or with the help of the OCaml community. Other minor issues crop up as a result of the translation, with the occasional odd sounding phrase popping up in the text and examples. These problems are, however, few and far between and do little to detract from the material or the presentation. And so this book still remains one of the best resources for learning Objective Caml. I used it when I was learning the language, and I still turn to it from time to time as a useful resource.
Will the book turn you into an OCaml guru, or teach you all sorts of advanced type system trickery? No, of course not. But it can teach you enough about the language to start you writing real apps in it. And it will allow you to add a fast, flexible, and powerful language to your toolbox.
Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
MLDonkey (Score:4, Informative)
Re:MLDonkey (Score:3, Informative)
FFTW (Score:3, Funny)
Re:FFTW (Score:3, Funny)
Further clarification (Score:4, Informative)
Re:Further clarification (Score:2)
I don't think that counts as writing it in C any more than compiling a C program to binary means that I *wrote* the machine code.
Re:MLDonkey (Score:2)
Re:MLDonkey (Score:2, Funny)
Muchly needed (Score:5, Funny)
Hell, I tell ya.
Intrigued? (Score:5, Insightful)
OCaml's major problem is that, like every other functional language available today, the breadth of its standard library and third-party libraries is totally pathetic in comparison to the likes of Java and Python. The same limitation applies to Lisp, Scheme, Haskell, Erlang, etc.
These languages face a Catch-22: until they're more popular, they won't attract enough developers to ameliorate the library situation, yet until they offer better libraries, they won't attract developers. Historically, this barrier has been surmounted in one of two ways: either a deep-pocketed corporation subsidizes library development until the language gains momentum (see Java, C#) or the languages are sufficiently "charming"/"hip" that the library support appears as a result of a grass-roots effort (see Perl, Python).
Is there any realistic prospect that one of the functional languages I mentioned will strike it rich in either of those ways? It doesn't seem likely to me.
Re:Intrigued? (Score:5, Interesting)
I totally agree with your comments about the need for a standard library. But, as you observe yourself, such things can be developed by the community: CPAN for Perl, CTAN for TeX, and Boost for C++ are all very high quality libraries that are pretty much entirely community-developed.
I think the most obvious missing thing is a figurehead for functional programming. A fair few of programming language geeks seem to be fans, but as someone posted here once before (sorry, can't remember who), functional programming has yet to find its Larry Wall. I'd like to think that the first time someone steps up and takes on that role, that will get the geeks going, and the snowball will start to form. All we need is someone qualified who wants to put in the effort, but of course there are going to be very few such people around in a relatively small corner of the programming world -- catch 22, indeed.
Re:Intrigued? (Score:5, Interesting)
On that front, it will be interesting to see what will happen in Parrot [parrotcode.org] successfully manages its dream of uniting (amongst others) Perl, Python and Ruby - allowing a module from one language to be used in another. Surely that confluence of communities could build a very formidable library indeed...
Jedidiah.
Re:Intrigued? (Score:2, Informative)
can you say Paul Graham [paulgraham.com]?
Re:Intrigued? (Score:5, Informative)
For GUI you have Tk, GTK, GTK2 ; some people have written interfaces to the Win32 API. Concerning data structures, the standard library has lots (lists, hashtables, queues, sets, maps), and if that's not enough, you name it, you have it (from splay trees to bitvectors), and not only esoteric data structures available only in functional languages. With Bigarray you can MMap huge arrays of whatever you want (bytes, floats). With the built-in lazy streams you can easily hack a LL parser, and if that's not enough you can run ocamlyacc. There are interfaces for Postgresql, mysql. Unix support is very complete (and portable). There is a good crypto library. For number-crunching you have the built-in number library, GMP bindings or numerix. Interfacing to C is excellent. I mean, come on, Perl and Java have, today, more in their libraries, but you really can't call Ocaml's library support "pathetic". Ocaml can and is really used for real apps (Coq, MLDonkey, etc.) with real GUIs. You can't say the same for Scheme. Plus, Ocaml compiles to machine code on i386, PowerPC and a few other architectures, and that runs damn fast even if you don't spend the afternoon optimizing your code.
Re:Intrigued? (Score:2)
Also, the crypto library is... a good start. Assuming you mean Cryptokit, it has issues.
Re:Intrigued? (Score:2)
Attack a niche (Score:3, Insightful)
To really understand this problem, you are going to have to read *gasp* marketing and economics books. "Crossing the Chasm" and "Information Rules" (network effects, lock-in, and so on) are ones I find interesting. I've heard "the innovator's dilem
Re:Intrigued? (Score:5, Informative)
I don't know; I've always been able to find libraries that I needed for Haskell; there are quite a few listed on the Haskell libraries [haskell.org] page. It seemed to me, when I was evaluating OCaml, that a lack of libraries bindings or bindings to other language's libraries was not a problem. They've got quite a decent database of extensions at The Camel Humps [inria.fr]
I'm mainly a Java and Ruby developer, though, so I may not have stressed tested the availability of Haskell libraries. Java doesn't use libraries; if somebody writes a third-party library for it, Sun re-implements it, poorly, and bundles it with the VM, which effectively kills the original, and often superior, library. And Ruby... well, you just create whatever bindings you need, dynamically, with 'dl'.
--- SER
Re:Intrigued? (Score:3, Funny)
--- SER
Re:Intrigued? (Score:2)
My biggest learning curve with lisp was with manipulating the data structures. Once I got that out of the way, I found the language to be quite impressive. It still tends to feel like scripting rather than "real" programming though, probably because I started out with E-Lisp.
Re:Intrigued? (Score:2)
Which is a shame IMHO, in some case functionnal style is easier to use, in other it is not: if a language supports both style, why not use the style which suits the problem?
Re:Intrigued? (Score:2)
Re:Intrigued? (Score:3, Interesting)
(Common) Lisp lacks only a non-proprietary and useful GUI toolkit. Otherwise it has just about everything. The fact that POSIX interoperability doesn't appear standardized is annoying, but the most annoying thing is that the good Lisp environments cost $$$$. I envy Lisp developers from a distance have never had the balls to really become one myself. It does take balls, too, to say to a group of Java-nerds or C++-nerds that something can
Re:Intrigued? (Score:2)
Re:Intrigued? (Score:2)
Eh... as long as you're sticking with a given implementation you have all that, and most of it is pretty good.
For that matter, nowadays if you're using lisp in a production environment you're pretty much using one of: Allegro, CMU-CL, or SBCL. They each have their
Re:Intrigued? (Score:2)
Maybe. Then again I haven't worked at a site that used Windows since 2001. Different perspectives I guess.
Re:Intrigued? (Score:5, Informative)
For many languages, this solves exactly the problem that you describe. The new language instantly gets the benefit of large, useful and well tested library. The language developers can focus on the design of their language and leave the hassle of building and maintaining the supporting run-time and library to someone else. Eventually they can add a more native-feeling system library layer over it, but targeting the
There's a few quirks involved in shoehorning functional languages this way. As I recall, the JVM is a bit more difficult to compile functional languages to since it is really intended to run Java.
Re:Intrigued? (Score:3, Insightful)
1) On a proprietary runtime. In the case of
Re:Intrigued? (Score:2)
Re:Intrigued? (Score:2)
Re:Intrigued? (Score:2)
Parrot may change this (Score:2)
That's one of the hopes behind a common multiple-language (polyglot ?) virtual nachine like parrot.
Parrot will support big language like Python and Perl6.
Bindings and libraries will be written for python-vm but could be used from within any language that supports parrot as target.
Then you could use or create whatever language you like. As long as it
Re:Intrigued? (Score:2, Interesting)
Re:Intrigued? (Score:2)
Stop there. that is the problem. The reason functional languages fail is because they are functional languages. They are powerful, but amazingly terse and difficult for even a jedi-level programmer to fully comprehend.
Great to hack in, great to show your buddies how amazingly awesom0 you are, worth fuck-all when you have a real development environment when the junior engineers outnumber the senior engineers 5-1 or even 10-1.
Oops bug
Re:Intrigued? (Score:2, Informative)
Re:Intrigued? (Score:2, Funny)
Re:Intrigued? (Score:3, Informative)
These languages face a Catch-22: until they're more popular, they won't attract enough developers to ameliorate the library situation, yet until they offer better libraries, [...]
This may have been true 5 years ago, but today you can call Perl 5 libraries [merjis.com] and Python libraries [sourceforge.net] directly from OCaml.Rich.
Re:Push popularity using .net/mono (Score:2)
Re:Push popularity using .net/mono (Score:2)
Unless Mono gets some sort of legal backup I wouldn't develop anything in
Re:Same Problem (Score:2)
I tried learning OCaml (Score:4, Insightful)
Jedidiah.
Re:I tried learning OCaml (Score:3, Informative)
Re:I tried learning OCaml (Score:2, Informative)
I would say Caml is a lot easier to get into then Scheme/Lisp or Haskell (having worked with all 3).
Haskell and Scheme are both nicer to program in however in Haskell it is often difficult to get good performance out of the final program and
Re:I tried learning OCaml (Score:2)
My first Caml script... (Score:4, Funny)
/___^ |
) | / \
/ |
| '-' / \
\ | |\
\ / \
\
||| \\ |
((| ((|
||| |||
Important Stuff
# Please try to keep posts on topic.
# Try to reply to other people's comments instead of starting new threads.
# Read other people's messages before posting your own to avoid simply duplicating what has already been said.
# Use a clear subject that describes what your message is about.
# Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
Problems regarding accounts or comment posting should be sent to CowboyNeal.
Dear CowboyNeal (Score:4, Funny)
Or because it's CAML, will it be allowed? Please tell me what to flame!
First o'caml script (Score:4, Funny)
o
oooo o
ooooo o oooo
o o o o
o o oo oo
o ooo o o
o o oo
o o o ooo
o oooooooo o
ooo oo o
ooo ooo
ooo ooo
oooo oooo
Lameness filter encountered.
Your comment violated the "postercomment" compression filter. Try less whitespace and/or less repetition. Comment aborted.
Important Stuff
# Please try to keep posts on topic.
# Try to reply to other people's comments instead of starting new threads.
# Read other people's messages before posting your own to avoid simply duplicating what has already been said.
# Use a clear subject that describes what your message is about.
# Offtopic, Inflammatory, Inappropriate, Illegal, or Offensive comments might be moderated. (You can read everything, even moderated posts, by adjusting your threshold on the User Preferences Page)
Problems regarding accounts or comment posting should be sent to CowboyNeal.
God is slashdots compression filter is retarded..
sik0fewl Preferences Subscribe Journal Logout Sections ain ApacheApple AskSlashdot 1 more Books BSD 2 more evelopers 1 more Games 11 more Interviews IT 4 ore Linux 1 more Politics Science 3 more YRO 2 ore Help FAQ Bugs Stories Old Stories Old Polls opics Hall of Fame Submit Story About Supporters ode Awards Services Broadband PriceGrabber ProductGuide Special Offers Tech Jobs IT Research
Re:My first Caml script... (Score:2)
Chapter 8: Toes (Score:5, Funny)
:D
Re:Chapter 8: Toes (Score:2)
Careful about speed comparisons (Score:5, Interesting)
Re:Careful about speed comparisons (Score:4, Insightful)
Re:Careful about speed comparisons (Score:2, Informative)
To compile functional code that looks pretty, the result is often resource wasteful:
- Memory is copied at every turn (in functional constructs, variables cannot be changed),
- About all small functions use recursive calls (no, tail-recursion doesn't solve most of them; often the result of the recursion has to be modified befo
Re:Careful about speed comparisons (Score:3, Insightful)
Re:Careful about speed comparisons (Score:4, Interesting)
Well, not quite. In C you pay as you go. You essentially have a direct mapping to common hardware. You can go faster, yes, but the improvement generally isn't worth it unless you're targeting specific weirdness like MMX or SSE2.
OCaml has some significant overhead that comes from the language definition. There's garbage collection, which while fast is certainly not free. Floating point values in mixed-type tuples are heap allocated (that is, the floating point values--doubles, actually--are separate heap objects). There's the classic issue with functional languages that the simple and easy way to build a list either involves stack space for each element or a full reversal of the list (not in place) at the end.
I fully agree with you that readability is worth a hit in performance. I use interpreted languages all the time, and compiled OCaml is certainly much faster than them. But OCaml advocates need to be careful about claiming their language is as fast as C/C++, because it generally isn't true. It's only true if you drop the nice features and write grungy C-style code, and then only in certain situations. This does not mean it is a bad language, however.
Re:Careful about speed comparisons (Score:2)
Actually, running benchmarks, it's found that the GC OCaml uses is faster than the repeated brk()s you get with C's malloc()/free(). If you profile it out, brk() is really expensive when you're dealing with a segmented heap/arena.
I don't know how the tuple issue falls out, though I'm sure Xavier Leroy and friends have done the best they can, as usual.
Re:Careful about speed comparisons (Score:2)
One of the advantages of functional languages that is not often mentioned is that it is relatively easy (at least in comparison with imperative languages) to implicitly parallelise the code. As an exercise, I sat down with a piece of Haskell code and some lambda calculus (*shudder*) t
Full Support? (Score:3, Informative)
Re:Full Support? (Score:2)
No. That sentence can be parsed two ways, and presumably was meant the other way to the way you interpreted it...
Re:Full Support? (Score:2)
"OCaml also has full support for object-oriented programming that fits in completely with Caml/ML's strong type system..."
Probably was more of a not-thinking typo than anything else, considering that OCaml is a superset of Caml, which is a superset of ML- both of which have strong variable typing.
Re:Full Support? (Score:2)
Yes they can. You just have to declare them slightly differently:
...
method blah : 'c. f:('c -> 'c) -> 'c =
will give you a polymorphic method (in the type 'c).
Unsigned 32bit int: While not representable directly, you can just use int32. Since all platforms which ocaml actually runs on are two's completement all operations except comparisons work as expected. If you need comparisons you can just use an int64 and make sure t
Huh. (Score:2, Interesting)
In related news, (Score:2, Funny)
No good tutorial about ocaml... (Score:4, Insightful)
I downloaded the compiler about a year ago but got turned off by the quality of tutorials.
You need easier reading material if you want people to adopt.
Re:No good tutorial about ocaml... (Score:3, Informative)
I learned the language online, (just as i learned Java from their very good tutorial)
they gave 2 good ones at the top.
the Richard Jones'
Ocaml Tutorial for people who know how to program 'normally' [merjis.com]
There is also an update to Jason Hickey's book [metaprl.org]
I like OCaml because it Combines the power of functional programming, like (tail-)recursion, functions as an argument, with 'normal' programming language statements.
It doesn't force the "functional programming way" on you, like Lisp does, So, you ca
Re:No good tutorial about ocaml... (Score:2)
Re:No good tutorial about ocaml... (Score:2)
Re:No good tutorial about ocaml... (Score:3, Interesting)
manual (Score:2)
I guess I am no computer science major because it was difficult reading.
Re:manual (Score:3, Interesting)
Functional languages are very intuitive to math majors, and people who study abstract computer science (which is essentially discrete math). Concepts like currying, recursion, and the like make a lot of sense if you're used to the way mathematicians think.
I don't know Ocaml, but I do program in Haskell.
Re:manual (Score:2)
Pascal comment (Score:3, Insightful)
We saw from the examples that the typing in C and Pascal failed for several reasons. It was too fine-grained, as in Pascal's useless distinction between an array of twelve characters and an array of thirteen characters. It led to many spurious error messages, which means warnings that are ignored and waste everyone's time. It was too easy to violate the type systems though union types and casts, and it had to be so, because of the preponderance of spurious errors.
Can't we give this one a rest? Has anyone run into s:array[1..20] of char being incompatible with s:='Foo'; since the 1970s?
I feel like I get slightly stupider out of empathy every time I read about that.
Re:Pascal comment (Score:2)
Re:Pascal comment (Score:2)
Re:Pascal comment (Score:2)
Turbo Pascal, that came out mid eighties had a string type. Delphi improved strongly on that.
Of course, one can try to argue that Borland dialects are not std pascal (the 70ies kind that the anti pascal rants are about), but the Borland dialects do account for 99.9% of the Pascal programmers.
Things I want to know about a new language: (Score:2, Interesting)
Re:Things I want to know about a new language: (Score:2)
Re:Things I want to know about a new language: (Score:2)
Re:Things I want to know about a new language: (Score:3, Funny)
Re:Things I want to know about a new language: (Score:3, Informative)
If you use C++ for its power and flexibility then some of the features in OCaml will make you cry, and realise how low-level C++ remains in some respects.
I write mathematical software all day in C++, which we use for exactly those reasons (and its good portability). Still, it hurts to think how many times 5+ lines of cluttered C++ would become a single, elegant line in a decent functional language. Obviously the work I do is particularly suited to a functional style, but I've always had a background envy
OCaml tutorial (Score:5, Informative)
I've also written an OCaml tutorial for people coming from 'conventional' languages like C, Perl and Java [merjis.com].
Rich.
Re:OCaml tutorial (Score:2)
Mercury (Score:2)
goto (Score:2)
In this talk [plover.com] appears the quotation:
Which made me physically shudder. What could these ancient horrors look like? Could anyone post a link to some of this ancient and offensive code? I mean I've written code for school if a group member has used *a* goto. This is something I need to see.
Re:goto (Score:2)
Big problem with OCaml (Score:2)
RTFL (Score:4, Informative)
The example given in QPL is using patches, but I don't see why you can't fork the source, since it would still be "separate" (just don't call it Objective CAML, but something else). QPL does not say your modification has to be in the form of patches.
great language, but not quite general purpose (Score:2)
Basically, if you can't write a complex FFT with a user-defined complex number type and have it work about as efficiently (in both space and time) as equivalent Fortran 90 or C++ code, then the language is not suitable for modern general-purpose applications. Java fails this test, too. Among commonly used modern languages, C++, C
Re:great language, but not quite general purpose (Score:2)
I completely disagree.
1) What do you consider "about as efficiently?" A ten-second search turns up an FFT benchmark [inria.fr] written by Xavier Leroy; he reports that it runs about 2/3 as fast as C code.
2) What the hell kind of "modern general-purpose applic
Re:great language, but not quite general purpose (Score:5, Insightful)
That code doesn't use a complex datatype--it uses real arrays and writes out the complex number operations. The FFT example was not to get an FFT, it was to illustrate a point about what operations a language can and cannot support.
2) What the hell kind of "modern general-purpose application" needs to compute FFTs quickly? That's a highly specialized application.
FFT itself is needed by lots of applications: financial software, image processing software, speech recognition software, speech synthesis software, etc. But it isn't about FFT in particular or complex numbers in particular: you encounter analogous problems with datatypes appearing in graphics, reliable numerical computing, graph algorithms, language processing, statistics, and lots of other areas.
3) If certain algorithms cannot be computed quickly in OCaml, just write them in C. Bindings to C functions are trivial to write. You want to do FFTs? It's already been done.
You just don't get it, do you? Numerical, semi-numerical, statistical, scientific, graphics, and visualization code is moving into applications and the people who are writing want better tools for writing it than using C or even C++. We are f*cking tired of being told by ivory-tower compiler writers that we should just write our code in C just so that they don't have to get their hands dirty. I have "just linked in" C code for 20 years: it's a lot of work, it's difficult to package, and it erases all the runtime safety that writing in OCAML should give you. It's time that language designers with aspirations for designing general purpose languages get a clue.
Languages like OCAML and Java are defective as general purpose languages because they don't support efficient data abstraction for numerical types. The fact that their designers just don't get that fact is a testament to the ignorance of their designers. It's also what people really mean when they say that those kinds of languages are "just not efficient as C/C++": it means that in C/C++, you can get whatever code you write to run fast, while in OCAML or Java, there are always problems where you have to drop down to C.
Re:great language, but not quite general purpose (Score:3, Interesting)
Don't get me wrong: I think OCAML is a great language for specific application domains (theorem provers, compiler writing, etc.), and Java has become a decent language for traditional server-side applications. But in order to become general purpose languages, languages that people can use instead of C/C++ without reservation, I think they must get better numerical support.
Better nu
An alternate view of the book (Score:2, Informative)
I initally used thebook as a resource for learning Ocaml. My review would be more like:
Language Core
This covers the basics of the language, although the presentation of material is somewhat disjointed, which makes the book challenging to use as a reference in the first programming steps.
The book is clearly a translation, and in some areas the translation is not especially literate, although the meaning of the text is always pretty clear.
The worst problem with the book is that it is severely out of dat
OCaml? How do you eat that? (Score:2)
Maybe Ocaml is the heck of a development language, but I think it's about 5 years late...
my 2 cents.
Top problem: GUI (Score:2)
If i had a combination of the two - python's pureness and cleanliness and Java's x-platform libraries - i would be pretty happy. However, i would still be stuck with Swing for GUI work.
I would like to see a language that is built for creating rich GUIs, and have it be as clean and simple as Python, and as well thought out as InterfaceBuilder (OS X).
Java/Swing (and TCL/TK is surely wors
Practical issues with functional languages (Score:2)
For example, sorting with functional languages is very very slow, since lists are copied over and over, and for each sorted element, a new list is created. For example, the quicksort algorithm takes each element of the input list, then splits the rest of the list to less than the element and greater than the element lists, sorts these lists and then combines the three pa
Re:I'd consider OCAML (Score:2, Interesting)
Re:I'd consider OCAML (Score:2)
Re:Man, I still don't 'get' functional programming (Score:2, Informative)
Re:Eiffel is all this and more... (Score:2, Informative)
If you add to the list of features the ability to compile to C source and the support for multiple inheritance then you get Eiffel. The lack of strongly typed extensive base library seems to a problem with Eiffel too.
O'Caml is a more advanced language than Eiffel in most respects. It has multiple inheritance too, BTW. Features O'Caml has that Eiffel doesn't:
* Type inference
* Higher order functions
* More powerful type definition (e.g. tagged unions).
* Syntax/semantics generally much more suited to fu
Re:Book is five years old, whew... (Score:2)
This is getting off-topic, but maybe this is more a reflection on your coding technique than on dynamically-typed languages?
Annecdotal evidence abounds for all sorts of claims concerning static vs. dynamic typing. My experience is just the opposite of yours.
More specifically, if you are writing anything larger than o