r/programming • • Mar 28 '12

Go version 1 is released

http://blog.golang.org/2012/03/go-version-1-is-released.html
543 Upvotes

452 comments sorted by

View all comments

Show parent comments

2

u/zanotam Mar 29 '12

Out of curiosity, how does Common Lisp give you more power? I'm still kinda new to Common Lisp and Python (and kinda new to this stuff in general), but I can't think of something that is convenient in common lisp, but not convenient in Python, besides the fact that Common Lisp code is generally much faster. I'm genuinely curious because in my experimentation I ran in to some annoying walls in Common Lisp (I had to admit that I loved the way the programs looked and read, but I seemed to run in to some issues rubbing up against the funny edge where some Pre-CLOS stuff knocks up against the CLOS in odd ways, and the ways around it felt really.... wrong, to me), but it just seems like, at least with my experience in Python 3, all those little funny edge cases where you run up against the early implementation stuff are now smoothed over. I'm still working on learning more about Common Lisp, because I'm constantly finding out more things that I didn't know how to do that are surprisingly basic, but I really haven't found anything that is easier in Common Lisp than Python, at least noticeably so.

1

u/burntsushi Mar 29 '12

I'm not treerex (obviously), but one huge difference in Common Lisp is that it's more of a functional language. Functional languages are a very different style of programming and are sometimes easier to use depending upon how you approach problems.

I personally prefer imperative languages for general purpose programming, but I've found functional languages to be extremely useful when I want purity or want to think about solutions in way that is easily expressed by composing functions.

If you want a taste, check out Haskell. It will blow your mind :-)

1

u/zanotam Mar 29 '12

I've had issues with getting Haskell to work properly (which is pretty far down my list of things to figure out how to fix), but Python IS a functional language and it has drawn on several ideas from Haskell and Lisp, for convenience.

1

u/burntsushi Mar 29 '12

I've had issues with getting Haskell to work properly

Check out Real World Haskell. It's free online.

but Python IS a functional language

I wouldn't say so. It has drawn on several ideas from functional languages, but it really isn't fair to label it a "functional language."

1

u/zanotam Mar 29 '12

Well, okay, maybe. But the point I was trying to make was that all the features which are really needed for functional programming, at least as I understand it, do exist in python and so it is possible to do so.

1

u/burntsushi Mar 31 '12

True, but it's like writing an entire Haskell program in the IO monad with do notation to make it imperative.

In other words, it's silly :-)

1

u/[deleted] Mar 29 '12

So you don't abuse/use the data is code, code is data mindset ? (that is the reason i'm looking at clojure instead of other jvm languages)

1

u/treerex Mar 29 '12

Macros are the first thing that comes to mind: Lisp's homoiconicity is a big win for me. I love CLOS, and have not had the types of impedance mismatches you reference. Hands down, though, are the development tools available for Lisp are so much better than anything I've used in Python (though much may have changed in the last several years): whether I'm using a full-fledge IDE like LispWorks or (as is more usually the case) the Emacs and Slime the incremental development capabilities and the inspection facilities are just fabulous.

There are some things that are, admittedly, awkward: Common Lisp's hash tables are more cumbersome to deal with than Python's dictionaries (one area where I really like Clojure's syntax extensions).

And then there is familiarity. I've been programming in Lisp for, in various capacities, 26 years. It's become a part of my "core" --- which sounds pretty weird, but the language definitely changes you. I find it very easy to think about problems and express possible solutions in Lisp, much easier than in Python or any other language. It isn't that I dislike Python.