10 ms·
>Here I show you that code can be really straightforward to read. Disagree 100%. That code is incomprehensible to me. And I don't think it's just because I hav
by d_burfoot 9y ago
>Here I show you that code can be really straightforward to read.
Disagree 100%. That code is incomprehensible to me. And I don't think it's just because I haven't written Lisp in a long time. I can look at code in other languages that I've never used (eg Haskell) and it makes sense.
Part of the problem, of course, is that there are no type annotations. But even other languages without type annotations are easier for me to read.
- lispm 9y ago> is that there are no type annotations The class MY-STACK is a type. (defmethod into (item (s my-stack)) "Push an item into our stack" (with-slots (the-stack) s (push item the-stack))) In above S is of type/class MY-STACK. ITEM is of class T, because there is no limitation defined. You could define a method for items of type NUMBER: (defmethod into ((item number) (s my-stack)) "Push an item into our stack" (with-slots (the-stack) s (push item the-stack))) > I can look at code in other languages that I've never used (eg Haskell) and it makes sense. That's unlikely. There is zero chance that somebody not knowing Haskell can understand any non-trivial Haskell code. Haskell has so many different concepts and a different notation including type inference and complex types, that it is difficult to understand without prior Haskell knowledge.