News for hackers. Stuff that matters.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by cageface on Tuesday August 31, 2010 @05:58PM (#1651007)
Lispers rightly tout the malleability of the syntax as a killer feature. The big problem is that any language you build in lisp is still pretty much lisp. If you're not already sold on s-expr syntax, and a lot of programmers, rightly or wrongly, don't like it, the fact that you can replace one s-expr syntax with another just isn't that convincing.

The irony here is that lisp's syntax will probably keep it from ever falling into obsolescence because it can adapt to any new general task but it will also prevent it from ever really breaking into the mainstream because for any particular task it's a non-optimal syntax and a steady procession of more specialized alternatives suit most people's needs better.

Re:Clojure or: How I Learned to Stop Worrying and Love the P... by nathanmarz on Tuesday August 31, 2010 @08:35PM (#1651386)
I'll admit that learning to be effective with Lisp's syntax took me a few months. It's a matter of getting used to that way of thinking about programming.

Now that I'm fluent, I strongly prefer the s-expression style for most problems. The uniformity of Clojure means that I can use the sequence library for an unbelievable variety of tasks. And I love that operations like "+" are just like any other function and can be passed around.

Another important point is that when you make a DSL in Lisp, that DSL can interoperate with all your other DSL's.

Re:Clojure or: How I Learned to Stop Worrying and Love the P... by cageface on Tuesday August 31, 2010 @09:35PM (#1651518)
I programmed pretty heavily in Common Lisp from about 2000-2003 and I got over the parentheses too after a few months. I can't say I ever really came to love the syntax though. I always thought of it as the price I had to pay for macros. I did get pretty tired of the religious zeal of a lot of lispers though. Too many insist that lisp is the "right" way to design a language and refuse to see it as the collection of design compromises it is, like every other language.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by aerique on Tuesday August 31, 2010 @06:52PM (#1651151)
For the particular task of list processing its syntax is pretty optimal ;-)
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by cageface on Tuesday August 31, 2010 @09:49PM (#1651552)
Ironically I think Haskell is actually much better for this.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by alnayyir on Tuesday August 31, 2010 @11:58PM (#1651782)
Points free ftw.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by jimbokun on Tuesday August 31, 2010 @09:20PM (#1651491)
What tool do you use to build an optimal syntax for all your needs?
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by cageface on Tuesday August 31, 2010 @09:49PM (#1651551)
I'm increasingly suspicious of DSLs. Mostly I work in languages like Scala or Ruby with a syntax that's expressive enough for almost anything as it is and avoid building DSLs on top of them. You can cover a lot of ground in any language that allows higher order functions and function, sequence and hash literals.

Syntax matters but it seems to have become a bit of an obsession lately.

Re:Clojure or: How I Learned to Stop Worrying and Love the P... by statictype on Tuesday August 31, 2010 @10:49PM (#1651646)
DSLs aren't just about the curly braces and lambdas. It's also about reducing the amount of boilerplate code required to achieve some task. You can do this with higher order functions and objects but only to a certain extent.

If you find that your language still requires boilerplate code to implement features in whatever domain you're working in, then perhaps it's time to get a new language - or write a DSL.

Re:Clojure or: How I Learned to Stop Worrying and Love the P... by cageface on Tuesday August 31, 2010 @11:53PM (#1651776)
Agreed, but I just don't find myself writing much boilerplate in modern languages. The other abstraction mechanisms take care of most of it.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by jules on Wednesday September 01, 2010 @06:22AM (#1652356)
That's the problem with boilerplate. You don't see that it's boilerplate until you see a languages where it's unnecessary.
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by khafra on Wednesday September 01, 2010 @12:37PM (#1653279)
If that's true (and it seems likely) how can you avoid writing blub in lisp? How can you ever know to what extent you're writing blub in lisp?
Re:Clojure or: How I Learned to Stop Worrying and Love the P... by jules on Thursday September 02, 2010 @04:49AM (#1655634)
You mean writing blub-like code in Lisp? You probably cannot avoid that on your own unless your name is Guy Steele or someone like him, but by reading non-blub Lisp code you can.