Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] recomendations for a functional language
- Date: Tue, 03 Nov 2009 04:33:10 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] recomendations for a functional language
- References: <20091102112350.bf06bfd6.attila@example.com> <20091101131525.5f4312bd.attila@example.com> <a63167770911010442pd642beco3268ed5c4a41d02@example.com> <20091102082821.GA28406@example.com> <a63167770911020112q1bd12b27ub5209902a971a6c9@example.com> <87hbtdtfch.fsf@example.com> <20091102150646.GD16339@example.com>
Curt Sampson writes: > I'll admit I don't have a lot of experience writing Lisp > macros. (Now, M4 macros, that's another story. :-)) You can say that again. Who needs Brainf*ck when you can program in M4? > On review, Clojure is certainly further from Common Lisp than I'd > thought in my last post (despite being a Lisp-1, and not a Lisp-2), Being a Lisp-1 takes it quite far from Common Lisp, IMHO. > especially in its emphasis on recursion rather than looping (though I've > not examined how well it really does when it comes to guaranteeing tail > call optimization, which is an important point when using recursion in a > language compiled to the JVM). It doesn't do any tail call optimization according to the website; that's up to the programmer to use the loop ... recur syntax, or the trampoline macro. > For Common Lisp versus Scheme, I'd summarize the differences as: > > * the Lisp-1 versus Lisp-2 distinction (which can itself be > over-summarized as whether function variables and non-function > variables share a namespace, but upon research it turns out to be a > lot more subtle than that), Again, CL is a Lisp-2 while Scheme is Lisp-1. > * that Lisp tends heavily towards iteration and Scheme towards > recursion, I would disagree with that. CL provides more facilities for iteration than does Scheme, it's true, but the most commonly used are mapping functions like mapcar and maplist, which are basically optimized tail calls. There's also horrible stuff like the loop macro, but we won't describe that in polite company. :-) Point is, design is often done using recursion, then optimized to iteration. > Looking at Clojure, actually, it seems as if it might be one of the > best of the Lispy languages to learn, if you're going to go that > way. I dunno. Clojure seems to have a lot of practical but inelegant stuff in it. It might be useful in future "real work", but I'm not sure it's a good way to learn about Lisp. Re: using "inelegantly programmed" libraries for dealing with money: > That's reasonable. I once started into a ferocious argument about using > floating point for representing monetary values. There was, on some > forum somewhere, a poor soul with a PHP shopping cart who was worried > that it was using floating point to represent dollars, and perhaps > things like a 7% discount on the entire order wouldn't work out > well. Did you point out that 90 trillion dollars is a pretty damn big order, even for the United States federal government? The point being that even if my back-of-the-hand numerical analysis is bogus, a few minutes with pencil and paper should convince one that this is not going to be a problem. The analysis can be done. (OTOH, if PHP uses IEEE 754 singles, he could run into trouble if he's selling yachts or condos.) I'm more worried about (say) the difficulty of adding a bit of memory to the system so that (for example) if there's an error in the phone number entered, the user gets presented with everything already filled in *except* the phone number. And keeping the phishermen out.
- Follow-Ups:
- Re: [tlug] recomendations for a functional language
- From: Curt Sampson
- References:
- Re: [tlug] recomendations for a functional language
- From: Attila Kinali
- [tlug] recomendations for a functional language
- From: Attila Kinali
- Re: [tlug] recomendations for a functional language
- From: Alan Busby
- Re: [tlug] recomendations for a functional language
- From: Curt Sampson
- Re: [tlug] recomendations for a functional language
- From: Alan Busby
- Re: [tlug] recomendations for a functional language
- From: Stephen J. Turnbull
- Re: [tlug] recomendations for a functional language
- From: Curt Sampson
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Permissions on local Apache web testing environment
- Next by Date: Re: [tlug] recomendations for a functional language
- Previous by thread: Re: [tlug] recomendations for a functional language
- Next by thread: Re: [tlug] recomendations for a functional language
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links