| ▲ | tmtvl 9 hours ago |
| Lisp is versatile as all get-out, so you can program however you want. For example, we can roll like it's 1969: (prog ((a 0)
(b 1)
(c 0))
(declare (type Fixnum a b c))
:fb-start
(print a)
(incf b a)
(setf a
(- b a))
(incf c)
(when (< c 100)
(go :fb-start)))
|
|
| ▲ | Joker_vD 4 hours ago | parent | next [-] |
| Which actually supports the OP's original argument that even with training and getting used to, this syntax reads harder than let a, b, c = 0, 1, 0
fb_start:
writen(a)
b +:= 1
a := b - a
if c < 100 do goto fb-start
|
| |
| ▲ | tmtvl 3 hours ago | parent [-] | | Leaving aside the fact that you have at least 4 (EDIT: 5) mistakes in that code, I find it less readable than the Lisp equivalent. The brackets reinforce the structure imposed by the indentation and help me keep track of order of execution. But that's how my brain works and that's why syntax is subjective. | | |
| ▲ | Joker_vD 3 hours ago | parent [-] | | My apologies, it should've been (if you insist on indentation) let a, b, c = 0, 1, 0
fb_start:
writen(a)
b +:= a
a :=
b - a
c +:= 1
if c < 100 do
goto fb-start
Would you care to elaborate about brackets helping with tracking the order of execution? I'm really curious about that part. |
|
|
|
| ▲ | 9 hours ago | parent | prev [-] |
| [deleted] |