News for hackers. Stuff that matters.
Re:Lisp: It's Not About Macros, It's About Read by haberman on Saturday February 18, 2012 @04:28PM (#3607803)
Some people like putting salt on grapefruit. I'm not saying that it's impossible to like Lisp's syntax, but empirically most people prefer the ALGOL-like syntax, which is why I referred to it in the next sentence as "conventional syntax."

I could attempt to prove to you that "conventional syntax" is inherently superior to Lisp syntax, but that would be a waste of both of our time.

Re:Lisp: It's Not About Macros, It's About Read by nessus42 on Sunday February 19, 2012 @03:26AM (#3608947)
Some people like putting salt on grapefruit.

You sound as if you think that putting salt on grapefruit is inherently strange, while in actuality there's a very good reason to do so: it reduces the perception of bitterness.

I'm not saying that it's impossible to like Lisp's syntax, but empirically most people prefer the ALGOL-like syntax

Empirically, most people prefer what they are already familiar with, so I'm not sure what this is supposed to prove, other than most people are already more familiar with Algol-like syntax.

For me, Lisp syntax has the definitive advantage that the first identifier in every expression tells me what to expect. I.e., I don't have to scan to the right to figure out what kind of expression this is. For me, this makes code much more readable. And this makes Lisp syntax more "nice".

Re:Lisp: It's Not About Macros, It's About Read by burgerbrain on Sunday February 19, 2012 @04:52PM (#3610549)
Presumably salt on grapefruit is thought to be weird since grapefruit is thought to be good for your heart, while the perception of salt is quite the opposite.
Re:Lisp: It's Not About Macros, It's About Read by krunaldo on Saturday February 18, 2012 @07:33PM (#3608203)
(+ 1 2 3) =

add 1 and 2 and 3

The syntax is a bit terse but if you teach people a good way to read it it becomes much more readable than 1+2+3

The only reason we prefer that way is that we are thought that syntax when we do math in school, I have found it much easier to teach people lisp who have no or very little formal education in math.

Re:Lisp: It's Not About Macros, It's About Read by Confusion on Sunday February 19, 2012 @03:53AM (#3608989)
This argument is based on too shallow an analysis and doesn't stand up to closer examination.

  (/ (+ (- b) (sqrt (- (* b b) (* 4 a c)))) (* 2 a))
Yeah, so it divides (the addition of (-b and the (sqrt of (the difference between (the product of b and b) and (the product of 4, a and c))) by (the multiplication of 2 and a))

Right, that's much easier than

  (-b + sqrt(b*b - 4*a*c)) / (2*a)
(-b plus the sqrt of ((b times b) - (4 times a times c))) divided by (2 times a)
Re:Lisp: It's Not About Macros, It's About Read by JBiserkov on Sunday February 19, 2012 @05:16AM (#3609088)
New lines in the Lisp, PLEASE :)

I see you omitted some parenthesis in the "conventional" expression, relying on the fact that multiplication takes priority over substraction. Making this fact explicit is exactly what makes Lisp better, especially for more complex domains: delegating priorities to the notation, freeing brain capacity for the actual problem.

Re:Lisp: It's Not About Macros, It's About Read by lispm on Sunday February 19, 2012 @05:25AM (#3609096)
If math is a problem for the user, there is the option to use a modified parser. For example using an infix parser called by a readmacro:

    (defun foo (a b c)
      #I( 

          (-b + sqrt(b*b - 4*a*c)) / (2*a)

        ))

    CL-USER 8 > (foo 1 2 3)
    #C(-1.0 1.4142135)
Re:Lisp: It's Not About Macros, It's About Read by Confusion on Sunday February 19, 2012 @05:33AM (#3609099)
Sure, there are solutions and it's awesome that they're both possible and easy to use. I'm not arguing against Lisp; I just don't agree that its syntax is better. I agree it is not worse, if you survey a sufficiently large variety of cases.

It may be bikeshedding, but I would not let 'blue is better than red, because the sky is blue' pass either.

Re:Lisp: It's Not About Macros, It's About Read by wicket232 on Monday February 20, 2012 @01:35PM (#3613324)
Once you add indentation, and know the simple rule that args line up vertically (unless they're so short that you'd rather leave them), the following is pretty easy to read:

    (/ (+ (- b)
          (sqrt (- (* b b)
                   (* 4 a c))))
       (* 2 a))
It tells me:

* there's a quotient of 2 things

* the first thing is a sum of -b and a sqrt

* the second thing is a product

and so on. Pretty nice. Of course, mathematical notation is more terse.

Re:Lisp: It's Not About Macros, It's About Read by Volpe on Sunday February 19, 2012 @12:11AM (#3608706)
Weak arguement. So rather than form a language around our existing learnings (in Math as you say). We should change all our existing learnings to suit a particular language... then it's more readable... riiiiight, good luck with that. :)
Re:Lisp: It's Not About Macros, It's About Read by dman on Saturday February 18, 2012 @05:00PM (#3607863)
Syntax is the vietnam of programming languages.
Re:Lisp: It's Not About Macros, It's About Read by anamax on Saturday February 18, 2012 @05:36PM (#3607946)
> I could attempt to prove to you that "conventional syntax" is inherently superior to Lisp syntax, but that would be a waste of both of our time.

Yes, trying to prove falsehoods is a waste of time.

Conventional syntax is neither conventional nor suited to humans. (If it's "conventional", why isn't there more agreement as to what it is? If it's suited to humans, why aren't there more than 100 who actually know it for any given language?)