Re: Perl6 vs Ocaml (was Re: Perl 6 Apocalypse 6)

2003-03-14 Thread Marty Pauley
On Tue Mar 11 15:45:12 2003, Nick Woolley wrote:
 So, judging by this reccomendation and others I've seen, if I were going to 
 learn a new language, it might be Ocaml.

I arrived at the same conclusion a while ago.

 Can anyone compare and contrast Perl6 and Ocaml?

I'm not able to do so in detail as I'm still an Ocaml newbie, but I have
noticed some apparent philosophical similarities.  The Ocaml designers,
like the Perl designers, seem to have a good pragmatic approach.  For
example, they've included imperitive features in an otherwise pure
functional language, so you don't have to learn what a monad is to print
Hello World.

-- 
Marty



Re: Perl6 vs Ocaml (was Re: Perl 6 Apocalypse 6)

2003-03-14 Thread Nick Woolley
On Tuesday 11 Mar 2003 5:37 pm, Greg McCarroll wrote:
 however I can say that ML[1] is very rewarding until you try and
 do anything involving interactive user input in it, then there is a
 hurdle which you must cross and after that follows blind devotion and
 madness.

Apparently OCaml has GTK and MySQL bindings, would that ameliorate this 
barrier?  Could it be used as a CGI language perhaps?

One of the problems I've had with perl (don't get me wrong, I'm a big fan of 
perl), and a problem which especially used to waste a lot of my time when I 
started, was that it sometimes Just Doesn't Work and because it just Doesn't 
Do What You Mean and you can't see why until you trace it down to not quite 
understanding the subtleties of something such as dereferencing a reference 
in a hash of hashes, or passing a sub the wrong number or type of arguments 
(a problem which still crops up frequently).

I suspect a lot of these issue would be cleared up by more pedantic 
typechecking in certain cases, and maybe perl 6 new features will help to 
address them.  (Oh god oh god how I hate languages like javascript and other 
ECMAscripts which are so fragile with respect to variable name changes as to 
be barely maintainable.)  

Anyway, being free and easy with autovivification and its friends has its 
places, but one of the potential appeals of OCaml is its stated strong typing 
which (advocates claim) reduces the number of silly hidden bugs in your code 
to almost nil.  I wonder if there is any truth to this?

Nick
__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com



Re: Perl6 vs Ocaml (was Re: Perl 6 Apocalypse 6)

2003-03-14 Thread Greg McCarroll
* Nick Woolley ([EMAIL PROTECTED]) wrote:
 On Tuesday 11 Mar 2003 5:37 pm, Greg McCarroll wrote:
  however I can say that ML[1] is very rewarding until you try and
  do anything involving interactive user input in it, then there is a
  hurdle which you must cross and after that follows blind devotion and
  madness.
 
 Apparently OCaml has GTK and MySQL bindings, would that ameliorate this 
 barrier?  Could it be used as a CGI language perhaps?
 

i used ML and motif once to create a multiuser diary and thats what i
was thinking of at the time i wrote the above, just having the
bindings would not make the mind trip you need to do
easier. functional languages are really cool for maths etc, but it
takes another leap of faith to move to interactive stuff, i'm not
saying interactive programming is bad in them i'm just saying it takes
a little bit of a head shift to feel happy doing it, at least for me.

Greg

-- 
*** ***
***   Email address has changed to [EMAIL PROTECTED] . Please   ***
***   update your email address book.   ***
*** ***
Greg McCarroll http://www.mccarroll.org.uk/~gem/
   jabber://[EMAIL PROTECTED]



Perl6 vs Ocaml (was Re: Perl 6 Apocalypse 6)

2003-03-11 Thread Nick Woolley
On Tuesday 11 Mar 2003 12:27 pm, Shevek wrote:
 Languages like ADA95 (I think), C++ (somewhat) [more examples?]

Perl5 uses closures.  Perl6 has curried functions (which I've never really 
come across in any other languages I've used).

I mentioned this to someone, who said that his language of choice is ocaml.  
An OO and functional language (and so has closures and curren functions etc), 
compiles to byte code and assembly, apparently very fast, and very typesafe, 
and you're less likely to have inadvertant bugs to to type mismatched.

So, judging by this reccomendation and others I've seen, if I were going to 
learn a new language, it might be Ocaml.  Can anyone compare and contrast 
Perl6 and Ocaml?

Nick
__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com