John, I hope that learning a Lisp first is a good idea for novice programmers, because I intend to inflict Clojure on my poor children. (They didn't take to http://scratch.mit.edu/ and Google's rehash of BASIC is a non-starter).
So far I have just a few reasons for picking Clojure as a first language: * Like big dogs, hopefully growing up with parentheses teaches the kids to respect instead of fear them. * The syntax is minimal, consistent, and as you noted designed with simplicity as a priority. Obviously my lesson isn't ready yet, but the course has been charted. Seth On Aug 5, 2:44 pm, John Newman <john...@gmail.com> wrote: > First of all, sorry that this post is so long-winded. I don't have a blog, > so this seems like the best place to put to words something I've been > thinking about for a while. > > One subject I haven't seen discussed is that of Clojure as a "first > language." By that I mean, the programming language that a person first > learns before learning any other programming language. I'm no expert at > computer programming, which is why this subject interests me in the first > place, but I do think there is a strong case for Clojure's candidacy as a > novice's first language. > > I'm not sure if I can call Clojure my first language. I've taken a 101 and > 102 course in Java. I've dabbled in Python, Ruby, and even Io, in order of > precedence. But I've never done any significant work or projects. I read a > lot about programming, I subscribe to many of the programming rss feeds, but > I only ever write code when it delights me, not because I have to. And, of > most of the languages I've tried, the languages eventually got in the way > and I lost interest. To my delight, Clojure doesn't get in my way. I can > hack and play and explore with minimal fuss. I've now written more in > Clojure than any other language. > > Now, as to whether my positive experience with Clojure is indicative of > Clojure's appropriateness as a first language, I have to ask myself whether, > in all my years on the sidelines of programming, I've unconsciously > progressed and am no longer a novice. In other words, am I a good subject > for this discussion -- a case study on Clojure as a first language? I think > I am, but perhaps other programming novices like me can un-lurk, chime in, > and give their experiences. > > Seeing as how Clojure is geared towards functional programming, one might > think these really advanced concepts of macros, immutability, laziness, > etc., aren't suitable for beginners. In fact, I think languages like Haskel > have created a stigma around functional programming. A friend of mine is in > the same boat as I am and I can't get him to try Clojure because he doesn't > feel like he can "dive in" to functional programming at this point. True, > Clojure has some advanced concepts, but I've written some neat toy programs > in Clojure so far (a small chat server/client, a cellular automaton, some > cli tools) and I haven't used any macros, multi-methods, parameter > destructuring, or any other gizmos. I feel confident I'll move on to those > when I'm ready. > > So yes, Clojure is advanced but it is also simple and easy to understand. > This is due in part to the homoiconicity of Clojure (and Lisp). As a > novice, I can immediately recognize the benefits of homoiconicity, as it > lowers the bar to entry – my impression is that it provides a more uniform > canvas on which to paint, where I can say "if this works here, then it will > also work there." The transactional memory, as it has often been compared > to garbage collection, has also significantly lowered the bar to entry for > novices like myself. I first wrote my multi-threaded chat server/client in > Java and my Clojure version is much more readable. The Java version worked > but the Clojure version worked correctly. > > I know that it's also been argued in academic circles that Scheme (or some > functional language) should be one's first language, not Basic, because it > teaches you to think about programming the "right" way the first time. I > can't speak with them as an expert but I can say that if they are right, > Clojure makes even more sense. This has been my experience. Even as a > novice, Clojure's access to Java libraries has enabled me to experiment and > learn on my own. Keep in mind, I'm only doing it because it's fun – There's > nothing forcing me to write code. > > Now, with that being said, if it's true that Clojure is indeed a good > candidate for a first language, is that worth anything? I hope I've > stimulated some thought (and discussion) about the relationship between > Clojure and novice programmers, but I also want to argue for taking this > aspect of Clojure into account when creating the future of Clojure and it's > libraries. Accommodating novices as a "first language" doesn't have to be a > stated design goal, but it should at least be known that the simplicity of > Clojure is a win for novices everywhere, and that can only benefit Clojure. > > Specifically, I would ask, can Clojure be kept simple? Can it even move > towards more simplicity? If two future features in Clojure overlap to some > degree, can they be combined, for the sake of simplicity? "More simplicity" > might cause a knee-jerk reaction in some people's minds, but it can be > argued that simplifying some things, like abstracting the first/rest > cons-cell notion from lists on to the rest of Clojure's data-structures, has > made Clojure more powerful. For me, it's also made things easier to > understand. > > As a side note, I'd like to add that the helpfulness and maturity of the > Clojure community is also a win for novices using Clojure. Please, keep > being awesome and helpful and keep gently guiding those of us who are still > learning in the right direction. > > Thanks for listening and thanks for Clojure! > > -- > John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---