On Fri, Aug 7, 2015 at 5:02 AM, Gary Verhaegen <gary.verhae...@gmail.com> wrote:
> Sorry for steering the discussion away from tooling, but have tou looked > at Racket and the research in teaching programming that's been going on > around it for the past ~20 years? > > One of their findings was that beginning with functional programming (1 > semester FP followed by 1 semester OOP) yielded better OOP prpgrammers than > a full year of OOP teaching. Some of them have recently branched out from > the original scheme-base syntax to a more python-like one. If you're > designing a curriculum for teaching FP and OOP I believe it's worth > investigating. > > And to steer back towards tooling, you could then use DrRacket, which is a > fantastic beginner's editor with debugger and code analyzer integrated. > > Thanks for these thoughts. By way of background... Yes, I checked into DrScheme / PLT before it became Racket. At the time I was on a pilgrimage, away from my commercial bread and butter language, the lowly Xbase, and seeking "computer graphics" (so I could do more geometry on the side). I went to Java then Scheme, then became enamored of J which I suppose is functional (its heritage is APL). Then Python (while still earning my bread and butter with Xbase i.e. VFP9). We stereotype kid-newcomers to programming as demanding to "write games" but that's putting words in their mouths, a lot of 'em anyway, as many'd be just as happy with some fancy visuals, both moving and still. Fractals (as in Mandelbrots and Mandelbulbs) fit here. A language like Mathematica can provide 2D and 3D visuals. Our school had pre-OST (O'Reilly) roots in working with Wolfram, round tripping those notebooks twixt calc students and their teachers (this was before I joined). But in using a dedicated ray tracer (in this curriculum, POV-Ray) you're less confined to "mathematical" topics i.e. go ahead and do photo-realistic art (plus it's free, which Mathematica only is on a Pi, right?). So in my Python for kid-newcomers, my back end has been (A) for 2D: POV-Ray, the free ray tracer (povray.org, CompuServ license) and (B) for 3D: a lot of Visual Python (vpython.org) -- once it came down the pike, with VRML before that (the Ux is quite similar -- rotate colorful shapes in real time, that your program defined). Here's a summary of how I'd mix 'em for my classrooms in Portland Oregon (often under the auspices of saturdayacademy.org): http://www.4dsolutions.net/ocn/pymath.html The individual stills you get from a POV-Ray may be strung together into movies ("cartoons" lets call 'em). So I'm really explaining the movie industry and the fact of "render farms" behind rendered movies like Shrek and Toy Story. For kid-newcommers, this information is relevant as most of 'em are already avid movie and TV program consumers -- and we want them to be makers of same (active not just passive -- both produce *and* consume). Back to your points: Saying good grounding in FP makes for better OOP programmers does indeed sound credible. But in a way that can be a matter of style i.e Python may be used to emphasize immutability, or to create a bog of mushy objects all secretly connected underground by tendrils. Python is like clay in that way. So for example, with my Quadrays (a defrecord in Clojure), when I negate one, I could have had it "stay the same vector, just now facing the other way" i.e. give it mutable state. But if direction can change and yet we say it's "the same", then what *can't* change? It gets messy when you let "the same things" mutate. So I of course don't do it that way. The VectorOps protocol is about returning new immutable Quadrays (or XYZ vectors), Clojure style. -v1 creates a new Vector, versus changing the state of v1. Saying FP -> OOP is a useful pattern maybe somewhat subversive of what's preached in the strict FP camp? Some of the most theological say you won't need a life after FP, i.e. why would we even bother with an OOP language? Would anyone still care for them? Saying FP makes good OOP coders begs the question of whether we want any OOP coders. Some FPers are eager to stomp 'em out perhaps? That's extremist, I agree. Realistically, the two camps are meeting in the middle as Python can be used in FP-ish ways, plus there's Hy, which overlays a LISP syntax, targeting the same VM. https://github.com/hylang/hy That Clojure shares a JVM with OOP's Java is the ultimate truce, right? So we could just make it more a circle or spiral (of styles more than just languages) and go FP -> OOP -> FP -> OOP... in some kind of chaotic oscillation. Isn't that what we mean by "inter-op" already? :-D Kirby -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.