3 ms·
I'm not sure I agree . . . pointers in C throw people for a lot of loops, but aside from that the types are as simple as you'll let them be and I'm pretty convi
by akeefer 18y ago
I'm not sure I agree . . . pointers in C throw people for a lot of loops, but aside from that the types are as simple as you'll let them be and I'm pretty convinced that most people have an easier time thinking in an imperative fashion than a functional fashion. The functional nature of Lisp just throws most people for a loop at first, because it doesn't match the naive breakdown of most simple programming problems. Likewise, the type system in OCaml throws a lot of people for a loop.
Mastering pointers, worrying about memory leaks, dealing with the loose typing, etc. are all things you need to do to write code well in C, but you can kind of muddle through as a beginner without those. You can't even get started with Lisp until you figure out the right way to break down your problem, and that's a huge barrier for most people. To put that another way, it's easier to mentally model what your algorithm should be in C than in Lisp (for most people), even if the actual implementation is a pain to get right, and its the mental model that's a barrier to entry for more "advanced" languages.
That said, C is certainly a harder language to learn than Python or Ruby.
- rkts 18y agoIf we were talking about purely functional languages, then I would agree. But Lisp isn't purely functional; it has assignment and loops and arrays and all the rest. You can program in the subset of Lisp that allows the same "mental model" as C and get the same results without worrying about pointers or buffer overflows. So I think Lisp is strictly easier.
- jsmcgd 18y agoThe fact that you only have one way of programming in C, 'the C way', can actually be a blessing. I've found that I've been paralyzed by the flexibility of Lisp. There are so many different ways to do the same thing that it is hard to choose between them.