Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!cs.utexas.edu!sun-barr!lll-winken!uunet!convex!convex.COM From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: Scheme in Perl? (sp?): The Blurb. Message-ID: <108984@convex.convex.com> Date: 19 Nov 90 23:19:43 GMT References: Sender: news@convex.com Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 43 In article flee@guardian.cs.psu.edu (Felix Lee) writes: > Perl's aggregate datatypes are crippled by being non-recursive: you > can't have vectors of vectors or tables of vectors. Recursive types > in Perl can be done by using references, but this is fraught with > danger. Perl isn't about nested data structures. It prefers flat data structures. Perl is more like a chainsaw than a jig saw. Or think of Perl as a bigger hammer. It lets you treat everything like a nail, and get away with it most of the time. But sometimes not. Larry Wall in 7577@jpl-devvax.JPL.NASA.GOV Sounds like you're the "sometimes not" case. Of course, there's also this to consider :-) The trick is to use Perl's strengths rather than its weaknesses. Larry Wall in 8225@jpl-devvax.JPL.NASA.GOV You might also check out Larry's excellent response to Don Libes in <8497@jpl-devvax.JPL.NASA.GOV>. It's kind of an "apologia pro perl" that describes Perl's weaknesses. This is one of them. > Another headache was a phenomenon I call "variable suicide". Consider > the following Perl fragment: > sub add { local($a, $b) = @_; return $a + $b; } > $a = 2; > print &add(40, $a); > This prints "80", instead of "42". It's a nasty bit of interaction > between local() and @_. To avoid it, sp? is sprinkled with code like > local(@sip) = @_; > local($a, $b, $c) = @sip; This is truly unsettling to me. I hope Larry declares it a bug and fixes it. Or declares both of us confused. To me a program shouldn't have to know anything about a library routine's choice identifiers. Your scheme stuff sounds like a significant piece of work, and probably a great program as well. If I'd ever need Scheme, I'll be sure to check it out. --tom