Article View: comp.lang.functional
Article #622Re: Why functional languages?
From: Fergus James HENDERSON
Date: Fri, 02 Oct 1992 05:47
Date: Fri, 02 Oct 1992 05:47
58 lines
2701 bytes
2701 bytes
spot@CS.CMU.EDU (Scott Draves) writes: >large lisp functions retain their clarity. large SML >functions are horrid messes. this is taken from the compiler itself >(something i work on). i didn't even have to try and find something >bad... (* Copyright 1989 by AT&T Bell Laboratories *). > > and getroot(APP(VAR f,wl)) = (f,mix(wl,standardformals wl)) > | getroot(APP(LABEL f,wl)) = > (case know f > of KNOWN((vl,e),ref(SOME fmls)) => (f,mix(wl@(map VAR vl),fmls@fmls)) > | KNOWN((vl,e),ref NONE) => > (let val tmp = targeting(wl,vl,e) > in (f,tmp) > end) > | KNOWN_CHECK((vl,e),ref(SOME fmls),_) => (f,mix(wl@(map VAR vl),fmls@fmls)) > | KNOWN_CHECK((vl,e),ref NONE,_) => > (let val tmp = targeting(wl,vl,e) > in (f,tmp) > end) > | STANDARD _ => (f,mix(wl,standardformals wl)) > | _ => die "a10 in CPSgen") So translate it to lisp for us, and then we have something to compare it to! >jamesh> Even with such a simple example, it's not obvious that the >jamesh> close brackets at the end of the lisp version are enough, > >i suppose you don't use an editor that matches ()s for you. If you *have* to use such an editor to make the language useable, then that is a definite disadvantage. >jamesh> where it's immediately obivous that the ML version has the >jamesh> correct syntax. > >where's the obvious syntax error in this: > >datatype foo = FOO of x >fun bar FOO x = x So? >i've written a lot of SML and lisp code, and my experience is that >syntax (especially ()s) is not a problem in lisp, but that i do have >problems (understanding and writing) SML. What sort of problems? >if someone else would like to defend SML syntax, please do so... Can we defend Haskell syntax instead? -- Fergus Henderson fjh@munta.cs.mu.OZ.AU This .signature virus is a self-referential statement that is true - but you will only be able to consistently believe it if you copy it to your own .signature file!
Technical Details
Message-ID:
<9227615.23589@mulga.cs.mu.OZ.AU>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjhReferences:
<TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr> <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk> <BvGz2u.2rv.1@cs.cmu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.functional Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) Subject: Re: Why functional languages? Message-ID: <9227615.23589@mulga.cs.mu.OZ.AU> Sender: news@cs.mu.OZ.AU Organization: Computer Science, University of Melbourne, Australia References: <TMB.92Sep28144424@arolla.idiap.ch> <annius.717696151@freyr> <TMB.92Sep28223555@arolla.idiap.ch> <26463@castle.ed.ac.uk> <BvGz2u.2rv.1@cs.cmu.edu> Date: Fri, 2 Oct 1992 05:47:55 GMT Lines: 58