4 ms·
> In C, because the base language gives you more, C does not have nested functions, lambda expressions, closures, ... it gives me less. Let's look at iteratio
by lispm 13y ago
> In C, because the base language gives you more,
C does not have nested functions, lambda expressions, closures, ... it gives me less.
Let's look at iteration.
C does give me primitive WHILE, DO WHILE and FOR statements. Nothing more.
I get almost nothing in C.
> But in Lisp, because the language (sans macros) doesn't give you much
It gives me already a language where WHILE and FOR can be written as functions.
(defun while (c b)
(tagbody
while
(if (not (funcall c))
(go end))
(funcall b)
(go while)
end))
In C you get the best of both worlds: no powerful iteration and no easy way to implement it.