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] "Go Considered Harmful"
- Date: Thu, 3 Sep 2020 21:17:57 +0900
- From: "Stephen J. Turnbull" <firstname.lastname@example.org>
- Subject: Re: [tlug] "Go Considered Harmful"
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
Curt J. Sampson writes: > On 2020-09-03 12:07 +0900 (Thu), Stephen J. Turnbull wrote: > > Extending typing to higher-order functions is a difference > > of kind rather than of strength. > > I think here you mean not that higher-order functions can be assigned a > type (C can do that), but that the _type language_ also has variables for > types and functions taking and returning types, Yes. > > >> The rule of thumb in Clojure is data structures over functions, and > > >> functions over macros. > > ... > > > ISTR Paul Graham saying something along the lines that he rarely had > > > more than a handful of macros even in a large program. > > > > defun is a macro .... (I'm not a big fan of Paul Graham.) > > Well, I think that Paul Graham meant what I meant <img src=trolly_mctroll_face.png /> > Once a macro is there and well-debugged, the forces that make the > rule of thumb useful aren't in play (at least not to anywhere near > the same degree). Well, this is where the hygienic macro thing comes in. I only play with Scheme, and that only occasionally. But I've been burned a number of times by Emacs Lisp macros, especially new ones imported from GNU. > > s/Lisp/Scheme/, please (even though I don't use Scheme much, hygenic > > macros rule). > > Well, I was speaking of Lisps in general. OK. I can't judge Haskell at all, so if you say Common Lisp macros beat Haskell's, I'm fine with that. > Well, I think that much of the "difficulty" in teaching Lisp, functional > programming in general, or even simple things such as recursion is due to > having to overcome existing experience on the student's part and the > general environment that considers things like recursion to be "harder" > than while/for/etc. It's hard to say. I've never really tried to find out what students already know. I do know it's generally easier to teach Python because (1) it's got modules that do what they need to do so they actually care, and (2) it's not R. I can say it took me a while to realize that if I was going to write recursive code in Lisp I should start by writing the stopping condition and then the recursive part in the else branch was easier to write. Before I figured that out, it was confusion all the way down.
- Re: [tlug] "Go Considered Harmful"
- From: Curt J. Sampson