News for hackers. Stuff that matters.
Re:The Idea of Lisp by stormbrew on Friday December 16, 2016 @12:29PM (#13194955)
Everything is an expression in Ruby, yes. Even `class` and `def` and `module`, for example. Though class, as a specific example, returns nil, so it's not terribly useful that it is one.
Re:The Idea of Lisp by junke on Friday December 16, 2016 @01:43PM (#13195593)
In Lisp, "def..." macros, like defclass, defun, etc. return the symbol to which is bound the definition. Not essential, but useful at times. I tend to find Lisp is full of details like this.
Re:The Idea of Lisp by kazinator on Friday December 16, 2016 @01:57PM (#13195730)
Well, Common Lisp!

In the Scheme language, many imperative forms have an unspecified result. For instance, see R7RS 4.1.6: "the result of the set! expression is unspecified".

Also, a related misfeature is that function arguments can be evaluated in any order.

Re:The Idea of Lisp by qwertyuiop924 on Friday December 16, 2016 @07:11PM (#13198097)
Yes, this is one of the things that I really want to punch the SSC for. Assignment should have a useful return value: even C, so often said to do The Wrong Thing, got that right.

But for those of you who aren't scheme programmers, it gets worse: because when RnRS says that the result of something is "unspecified" many implementations take it literally. That's right: in many Schemes, `set!` returns the literal value #<unspecified>. I swear I'm not making this up. It's awful.

To quote Jonathan Gabriel of Penny Arcade: "Baby, why you always gotta make me hit you?"

Re:The Idea of Lisp by junke on Friday December 16, 2016 @02:08PM (#13195824)
Yes, sorry, Common was implied (not claiming it should always be, but here I wrote it without thinking about others). Scheme's unspecified results are annoying indeed.