Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dangling Else

Name: Anonymous 2013-06-16 13:34

Why allowing IFs missing ELSE at all? Even Scheme forbids IFs without ELSE clause. Although retarded Common Lisp allows them, despite having WHEN and UNLESS.

Name: Anonymous 2013-06-16 14:08

Scheme forbids IFs without ELSE clause
Nigger, have you read your SICP?

syntax:  (if <test> <consequent> <alternate>)
syntax:  (if <test> <consequent>)
Syntax: <Test>, <consequent>, and <alternate> may be arbitrary expressions.
Semantics: An if expression is evaluated as follows: first, <test> is evaluated. If it yields a true value (see section 6.3.1), then <consequent> is evaluated and its value(s) is(are) returned. Otherwise <alternate> is evaluated and its value(s) is(are) returned. If <test> yields a false value and no <alternate> is specified, then the result of the expression is unspecified.

http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_sec_4.1.5

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List