5 ms·
Great to have you here! Did you ever try Smalltalk? Is there any area where you would prefer Smalltalk over LISP? If you had to start from scratch, which of t
by leobg 5y ago
Great to have you here!
Did you ever try Smalltalk? Is there any area where you would prefer Smalltalk over LISP?
If you had to start from scratch, which of the two would you learn today, and why? (Let‘s assume that getting hired is not your concern, but only the ability to build powerful systems and the ability to reason about difficult problems.)
Thanks!
- lisper 5y agoI've never tried Smalltalk so I can't really speak to that. But I have done some coding in ObjectiveC which is a direct descendant so I can tell you that I strongly prefer Lisp, and Common Lisp specifically because I prefer generic functions to message-passing. Message passing privileges the receiver object and thus introduces an asymmetry which is totally unnecessary. It does nothing but cause confusion. The whole point of having a high-level language is to reduce the cognitive load on the programmer, and message passing does the exact opposite. Message passing forces me to think, every single time I call a function, about whether to write a.f(b, c, ...) or f(a, b, c, ...) or that absolutely horrific syntax that ObjC has, [f a:b] or something like that. There is no reason why I should have to think about any of that. That's the compiler's job. All function calls should use the same syntax -- and that syntax should be (f a b c ...) because all those commas are unnecessary too.
- leobg 5y agoMakes sense. Thank you!
- lisper 5y agoYou bet.
- xkriva11 5y ago...or a b c f because all the parentheses are unnecessary too (Forth nudge ;-) ) I think that Smalltalk deserves a little bit of opened mind here. In many respects, it is the closest thing to Lisp machines experience you can get today.
- lisper 5y ago> all the parentheses are unnecessary too That's not quite true. In Forth it is impossible to tell syntactically where the function calls are. > it is the closest thing to Lisp machines experience you can get today. I think Clozure Common Lisp running on a Mac (i.e. with the IDE) is pretty close as well. But I don't begrudge anyone their Smalltalk. It's just not a good impedance match to my brain.
- AnimalMuppet 5y ago> It's just not a good impedance match to my brain. I think that's the answer to every language war ever. "To my brain." If you claim "X is easier to understand", you get a war. But if you claim "for my brain, X is easier to understand", that's a lot harder to have a war about. All someone can reply is "well, my brain is different", which... OK, your brain is different. Fine. (Or someone could claim that nobody could actually have a brain such that X is easy to understand, at which point it's pretty clear who the unreasonable zealot is.) In fact, I think this is also the answer to the editor wars. It may even be the answer to the political wars.
- lisper 5y agoWell, not quite. Some languages are by design good impedance matches to brains that don't know very much. BASIC is the canonical example. It's really easy to learn, which makes it attractive to beginners, but it has some pretty serious limitations that you only become aware of after discharging a certain amount of ignorance. IMHO this makes BASIC objectively worse than other languages. To me, Lisp makes every other language I know feel like BASIC in the sense that the distinguishing features of the language feel to me like they are designed to appeal to ignorance rather than to empower.
- dwohnitmok 5y ago> IMHO this makes BASIC objectively worse than other languages. "IMHO" and "objectively" are in fairly stark opposition.
- d-mason 5y agoI would say the same thing (or more exactly, the dual) from a Smalltalk perspective: I just want to send a message to an object, I shouldn't have to figure out what function to call or what to parenthesize. The problem people get into with OO (particularly Java, C#, C++) is thinking in terms of method-function calls rather than message sends. Although I do like Lisp generics - I did a bunch of programming in rscheme many years ago, and really liked it.
- ncmncm 5y agoMessage passing within a process and function calls are exactly, precisely isomorphic, so complaining about one or the other is just parochialism.
- pjmlp 5y agoSmalltalk and Common Lisp are on my favourite languages list. Yet I never got the point of arguing about implementation details regarding virtual method dispatch versus message passing. Specially when many OOP GUI frameworks combine both approaches.
- ncmncm 5y agoIt's not even an implementation detail. Both use, ultimately, JSR and RET instructions. It really comes down to fetishism, which is why I don't use either of them. I am not a Fetish-Oriented Programming enthusiast. It is also why I am not all in on Rust. Memory safety is pretty important, but it is far from the only important thing in programming. The amount of attention Rust insists I devote to it is attention I don't have available for the other things that, frankly, deserve it more. Considering that in the last 10 years I have spent strictly less time debugging memory usage errors than preparing compiler bug reports against Gcc, putting memory correctness guarantees front and center ahead of all else seems to me a mis-allocation of my extremely scarce attention. Attention is by far the scarcest resource available to any programmer. Allocating and applying attention where it is most needed is the central problem of programming. A language that overrules your judgment as to where your attention must be thus interferes with the core business of programming. C++ does demand just a little more attention to memory management than some other languages, but less all the time. It pays that back by eliminating most taxes on performance, a swap I agree to.