News for hackers. Stuff that matters.
Re:Playing with Syntax by klibertp on Monday August 22, 2016 @04:11AM (#12334811)
I put `c` there because `destructuring-bind` is lexically scoped and only binds values to names inside of it. This may be a good or a bad thing, depending on your use case, but I prefer having the scopes clearly visible.

The quote is a multi-purpose element of the syntax, unlike `[` in Python, which only serves a single purpose (actually, it doubles as an item getter syntax). Whether having a single, more universal construct which you can use in many situations, or having a few more specialized constructs is more elegant is debatable and I think a matter of taste.

The problem with having specialized syntax for this is that it's not extensible. For example, we (I'm a Python programmer, too) had to wait for 3.4 (IIRC) for a very simple feture of `a, b, *c = range(10)`; with a language built on macros you can extend these constructs as much as you wish. For example adding support for destructuring hash-maps (if it's not supported already) shouldn't be a big problem; on the other hand adding a specialized syntax for dict destructuring in Python is impossible within a language.

Re:Playing with Syntax by abritinthebay on Wednesday August 24, 2016 @02:02PM (#12353950)
Good explaination! Thank you!

That does explain it very well but I'd also argue that a syntax that requires that much explaining probably can't be called "elegant".

Powerful though? Yes. Lips syntax certainly is that.