I'm trying to get a better understanding of how S-expressions are evaluated in different lisps and wanted to see they would handle interesting ill-formed expressions. I get that Common Lisp and Scheme are totally different languages, but is there a specific difference in their semantics that explains the difference in behavior. For example, Lisp-1s and Lisp-2s have observable differences in their behavior, as do hygienic vs non-hygienic macro systems.

I have a program containing an unreachable ill-formed *if* expression in Scheme and Common Lisp.

```
;; foo.scm
(if #t 1 (if))

(display "12")

```

And the Common Lisp version

```
;; foo.lisp
(if t 1 (if))

(display "12")

```

`chicken` and `guile` both produce a syntax error.

Chicken:

```
% chicken foo.scm

Syntax error: (foo.scm:1) in `if' - pair expected

    (if)

    Expansion history:

    <syntax>      (##core#begin (if #t 1 (if)))
    <syntax>      (if #t 1 (if))
    <syntax>      (##core#if #t 1 (if))
    <syntax>      (if)  <--

```

Guile:

```
% guile foo.scm
...
.../foo.scm:1:9: source expression failed to match any pattern in form (if)

```

`sbcl` and `clisp` both print 12 and emit no warnings.

SBCL:

```
% sbcl --load foo.lisp
This is SBCL 1.3.11, an implementation of ANSI Common Lisp.
...
12
0]^D

```

CLISP

```
% clisp foo.lisp

"12"

```