From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA14125; Tue, 18 Nov 2003 22:29:03 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA13712 for ; Tue, 18 Nov 2003 22:29:01 +0100 (MET) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAILT0106017 for ; Tue, 18 Nov 2003 22:29:01 +0100 (MET) Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id hAILStC13794; Tue, 18 Nov 2003 15:28:56 -0600 (CST) Date: Tue, 18 Nov 2003 16:28:24 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Ville-Pertti Keinonen cc: Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors In-Reply-To: <20031118120517.GA881@exomi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 0600,:01 java's:01 python:01 python:01 run-time:01 run-time:01 powerfull:01 compile-time:01 circumvent:01 subclassing:01 drove:99 ocaml:01 ocaml:01 lisp:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Wandering into language advocacy here. On Tue, 18 Nov 2003, Ville-Pertti Keinonen wrote: > On Mon, Nov 17, 2003 at 03:20:36PM -0600, Brian Hurt wrote: > > > into C++). And Java is the only language whose memory management is more > > advanced than 1968-era LISP. > > Did you forget to include the word "mainstream"? Yes I did. For example, Ocaml has good memory management. Note that Java's memory management is still only "excusable", not good. The common case of an allocation in Ocaml is 5 simple instructions. In Ocaml, it's simply not usefull to optimize allocation (for example, keeping a pool of pre-allocated objects around), as native allocation is simply too fast. You don't gain, and it's way easy to lose. Last time I checked, Java still had a problem with allocation being slow, causing Java programmers to work around it. > > > I want a copy. But I don't know how close to mainstream it is. Perl, > > Python, and Ruby are scripting languages, still mainly used for short, > > single-person, throw-away projects. And they aren't that far from > > Python and Ruby are hardly scripting languages, even though they are > often used as such. I think they could be decent general purpose > programming languages except for a few unfortunate design decisions > (such as scoping rules). Have there been any large projects (multiple developers, tens to hundreds of thousands of lines of code) in Python or Ruby? One problem I have is that programming is going away from strict compile time type checking to run-time type checking. The problem with run-time type checking is that it only catches errors in the field. Static type checking is the most powerfull tool we've come up with to ensure correctness in programs. And no, unit tests are not a replacement for strict compile-time type checking. The problem is that the only type checking people are aware of is Pascal/Algol-68 type systems. Which require you to be able to circumvent. And so you end up spending most of your time circumventing the type system, which causes smart people to wonder why it's there in the first place. The industry being stuck in the summer of love *is* having negative effects. > > > C in it. Java succeeded because IBM, Sun, Oracle, and a number of other > > huge companies got behind it. > > Not just that, the OO hype is a huge factor. Faced with advocates who > claim that subclassing is all you need and other language features > are undesirable, it takes a while for inexperienced programmers - even > smart ones - to become disillusioned and take the time to learn > something different... The OO hype was what drove the adoption of C++. See, in C++, you can write straight old-style procedural/imperitive C, and then tell your boss "Of course it's object oriented- it's in C++, isn't it?" I've seen my share of procedural C++ in my time. > > It's difficult for programming languages to be judged on merit. People > who are reasonably unbiased and know enough to be able to make informed > comparisons aren't likely to consider any language or paradigm the > "one true way". But not many people listen to advocates who don't claim > that their solution is perfect. > > I'm fairly sure nobody on this list would claim that OCaml is above all > other languages for every possible purpose. I will go one farther, and name one use for which C is a better solution than Ocaml: writting an OS, device driver, or embedded code which does a lot of banging directly on hardware. > > However, does anyone consider OCaml the best existing language for a > particular use? Or just the most convenient implementation of the > features needed? For any large, complex, data structure & algorithm heavy application, Ocaml is the best language I know of. It's not the best possible language (I can think of a number of improvements to Ocaml I'd like to see), but it's better for that purpose than any other language I know. -- "Usenet is like a herd of performing elephants with diarrhea -- massive, difficult to redirect, awe-inspiring, entertaining, and a source of mind-boggling amounts of excrement when you least expect it." - Gene Spafford Brian ------------------- 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