News for hackers. Stuff that matters.
Re:Playing with Syntax by lispm on Saturday August 20, 2016 @12:47PM (#12327292)
In CL without the need for destructuring:

    (setf (values a b c)
          (values 10 20 30))
Re:Playing with Syntax by icebraining on Saturday August 20, 2016 @12:49PM (#12327305)
That's still three superfluous words. I have to agree with abritinthebay, especially when comparing with Python's destructuring, which doesn't even need brackets:

  a, b, c = 10, 20, 30
Re:Playing with Syntax by lispm on Saturday August 20, 2016 @12:52PM (#12327317)
What about all those superfluous commas? I also dislike languages where expressions don't have visible bounds.
Re:Playing with Syntax by icebraining on Saturday August 20, 2016 @01:05PM (#12327381)
A line break isn't visible? Not by itself, I suppose, but in the code, it's hard to miss.
Re:Playing with Syntax by lispm on Saturday August 20, 2016 @02:10PM (#12327676)
for what expression does the line break stand, exactly?
Re:Playing with Syntax by smallnamespace on Saturday August 20, 2016 @02:22PM (#12327728)
But why must everything be an expression?
Re:Playing with Syntax by davexunit on Saturday August 20, 2016 @04:34PM (#12328201)
Because anything else is a language design mistake.
Re:Playing with Syntax by smallnamespace on Saturday August 20, 2016 @04:53PM (#12328271)
Can you justify that statement empirically?
Re:Playing with Syntax by 918723192 on Saturday August 20, 2016 @03:15PM (#12327937)
a, b, c is a tuple. Parentheses can be omitted, same as in some ML dialects:

  # let a, b, c = 10, 11, 22;;
  val a : int = 10
  val b : int = 11
  val c : int = 22

  # a, b, c;;
  - : int * int * int = (10, 11, 22)
  # (a, b, c);;
  - : int * int * int = (10, 11, 22)
Re:Playing with Syntax by kazinator on Saturday August 20, 2016 @12:58PM (#12327352)
Python needs a piece of whitespace on the left of the correct size and tab/space constituency, and a newline on the right.

It's ambiguous. What is the relative precedence of the comma and equal sign? You just have to know.

Lisp means never memorizing associativity and precedence tables again.

Re:Playing with Syntax by icebraining on Saturday August 20, 2016 @01:10PM (#12327407)
No, just the name and argument order of a bunch of functions/macros (set, setf, setq...).
Re:Playing with Syntax by smallnamespace on Saturday August 20, 2016 @03:01PM (#12327889)
> never memorizing associativity and precedence tables again.

Why is that an unambiguous benefit though?

By that logic, we ought to have parentheses around every mathematical expression as well.

I think there's a sane middle ground between forcing people to memorize endless precedence tables versus not having any implicit precedence at all.

Re:Playing with Syntax by kazinator on Saturday August 20, 2016 @06:43PM (#12328586)
> By that logic, we ought to have parentheses around every mathematical expression as well.

Yes we should. Some math notations are simply crazy; they make it hard to follow the semantics.

The one thing that turns me off math is the notation.

A lot of math papers don't explain their notation; that's another problem.

Re:Playing with Syntax by Macha on Saturday August 20, 2016 @03:39PM (#12328019)
> Python needs a piece of whitespace on the left of the correct size and tab/space constituency, and a newline on the right.

Good luck getting your lisp code merged with mismatched tabs/spaces or everything aligned to column 0.

Re:Playing with Syntax by abritinthebay on Sunday August 21, 2016 @01:08PM (#12331658)
Better, I wouldn't call it elegant though. But better than other Lisp example in this thread.

Though realistically you're destructuring in the same way just with implicit vs explicit structure.

Practically speaking there's no difference but CL has a less clear syntax.