I think the strongest evidence of this is functional vs imperative paradigms. It’s rare to find a functional programmer who didn’t have something like lisp or Haskell as their first language.
Arguments trying to separate lisp from functional programming generally fall apart pretty quickly, notwithstanding common lisp in particular being multi-paradigmatic by design.
The Lisp that was popularly taught in school (Scheme) is mostly functional though. Functional doesn't mean that mutating state is impossible, just that it is discouraged.
I'm not sure I've ever actually known any programmer in general that started with a functional language, unless we want to count Javascript. I know they exist, but it can't be common.
My (crusty old) experience is that folks who did CS in college at schools that were more theory-driven tend to have experience with functional coding. I don't recall being taught Lisp but I do remember having to just figure it out for class. Because the class wasn't about teaching a language and there was homework in Lisp.
I've seen a lot of professional programmers pick up Clojure from varied backgrounds and come to write idiomatic functional Clojure. I don't actually know many people who use Clojure daily whose first language was a Lisp or an ML, everyone seems to learn Javascript, Python, or Java. Some of the older programmers learned assembler or C/C++ first.
Clojure really encourages data-oriented programming, similar to what you often find in Python codebases. Mutation isn't the default in clojure for common data structures, so writing your iterative code is just more work than writing functional code using the immutable defaults. Language design has a big impact here. That's not to say you can't write imperative mutation heavy code in Clojure, but you're either going to fight the language or build up your own utility libraries to do it. It's there, but it's rarely idiomatic and often seen as a performance tradeoff.
I think the author even grants too much to the opposing viewpoint. Think of e.g. Prolog vs LISP vs C vs Haskell. I wouldn't call those "different forms of the same mathematics"; I'd be more likely to call them "different foundations of mathematics"! Learning C may be a small aid to learning Prolog, but I really am not sure it's a big aid.
I think the programming language chosen to teach programming matters a lot. I'm unsure if this is the case for everyone, but the language I'm using dictates my mindset in solving a problem. If I'm using Python, then my data structures will very likely be lists and dicts, and my solution will resolve around manipulating those. While C means that I'll be using structs and pointers, so I need to keep some thought capacity available there.
C makes me think like an engineer, deliberate and thoughtful; Python makes me think like a child, playful and experimental; Java makes me want to break up the problems a lot and generalize every case. Etc.
I like lisp as a teaching language. I understand why first-year programming classes prefer more "useful" languages. But I genuinely think lisp puts me in the correct mindset for computer science topics.
Not sure about 'useful', but the first language taught in my college CS courses was Turbo Pascal. A bit OO, but also had pointers, etc... I guess it was fine.
TBF though, where I went to school, after the first two classes students were expected to pick up the 'class language' for all future classes. This meant C in compiler and OS class, Java in data structures, Python and Lisp in some other classes. We were learning CS topics, and the given language was just a tool that could change depending on which teacher taught the class that semester.
By the mention of Turbo Pascal above you can probably guess this was a long time ago. I'm sure schools have changed since then.
Like most kids in my generation (learning to program in the early 1980s) BASIC was my "first language", but it wasn't until I learned C at college in the late 80s that I really started to feel capable. I rarely use C for work anymore but I still "think in C" when trying to work out any sort of low-level algorithm no matter what language I wind up implementing it in (nowadays mostly Python and JavaScript).
What I like about C is that it can teach people the fundamentals of programming without imposing a lot of implicit structure on learners.
A lot of courses start with Java and I think that makes it really hard for students later to untangle the concepts of programming from the OO ones Java imposes on people.
This reminds me of Northeastern's CS undergrad curriculum. First semester we learned Racket (a basic functional Lisp language). Then second semester we learned Java, but in a strange functional way (kind of like writing Java "as if" it was Racket, often using one-line functions and recursion). Afterwards you learn more traditional Object-Oriented development and algorithms, then branch off into (optional) web-dev, distributed systems, embedded systems, ML, etc. or go back into higher-level functional / OOD-style classes.
At least from my understanding, this doesn't seem to affect students when they gradate, e.g. they aren't programming any different then any other college. Although, Northeastern grads are supposedly known for being good developers. Maybe that's just the rigorousness of the curriculum itself.
It makes giant difference - tooling, community, resources, low level concepts vs getting stuff done
I remember starting with C++ - everything was painful/confusing and unclear. It was some older C++ and CodeBlocks
Once I witnessed C# and Visual Studio I instantly felt like everything makes sense, is easier, documentation is readable and productivity is increased, so I switched.
I could focus on challenging problems instead of fighting with the language.
I largely don't really agree with the article, other than that it feels like too often the first language students learn is not chosen very carefully.
I'm personally leaning towards C or Javascript — which are in a sense total opposites — but they both have interesting strengths for first learners.
C is great because it's statically typed and it's hyper-simplicity allows students to really grasp the fundamentals of programming and how a program works. On the other hand Javascript and the web stack allows people to quickly do something fully interactive, and I think this can be really motivating.
At my former high-school there was one CS teacher that basically only taught students how to do math in Java. Naturally, a lot of students quickly lost interest as a result.
For people who aims to become professional software engineers, sure. But you can't expect other professionals to learn more than one language though, learning one is more than enough work.
19 comments
[ 1.9 ms ] story [ 59.2 ms ] threadI'm not sure I've ever actually known any programmer in general that started with a functional language, unless we want to count Javascript. I know they exist, but it can't be common.
FTFY
My (crusty old) experience is that folks who did CS in college at schools that were more theory-driven tend to have experience with functional coding. I don't recall being taught Lisp but I do remember having to just figure it out for class. Because the class wasn't about teaching a language and there was homework in Lisp.
Clojure really encourages data-oriented programming, similar to what you often find in Python codebases. Mutation isn't the default in clojure for common data structures, so writing your iterative code is just more work than writing functional code using the immutable defaults. Language design has a big impact here. That's not to say you can't write imperative mutation heavy code in Clojure, but you're either going to fight the language or build up your own utility libraries to do it. It's there, but it's rarely idiomatic and often seen as a performance tradeoff.
C makes me think like an engineer, deliberate and thoughtful; Python makes me think like a child, playful and experimental; Java makes me want to break up the problems a lot and generalize every case. Etc.
I like lisp as a teaching language. I understand why first-year programming classes prefer more "useful" languages. But I genuinely think lisp puts me in the correct mindset for computer science topics.
TBF though, where I went to school, after the first two classes students were expected to pick up the 'class language' for all future classes. This meant C in compiler and OS class, Java in data structures, Python and Lisp in some other classes. We were learning CS topics, and the given language was just a tool that could change depending on which teacher taught the class that semester.
By the mention of Turbo Pascal above you can probably guess this was a long time ago. I'm sure schools have changed since then.
Like most kids in my generation (learning to program in the early 1980s) BASIC was my "first language", but it wasn't until I learned C at college in the late 80s that I really started to feel capable. I rarely use C for work anymore but I still "think in C" when trying to work out any sort of low-level algorithm no matter what language I wind up implementing it in (nowadays mostly Python and JavaScript).
A lot of courses start with Java and I think that makes it really hard for students later to untangle the concepts of programming from the OO ones Java imposes on people.
At least from my understanding, this doesn't seem to affect students when they gradate, e.g. they aren't programming any different then any other college. Although, Northeastern grads are supposedly known for being good developers. Maybe that's just the rigorousness of the curriculum itself.
I remember starting with C++ - everything was painful/confusing and unclear. It was some older C++ and CodeBlocks
Once I witnessed C# and Visual Studio I instantly felt like everything makes sense, is easier, documentation is readable and productivity is increased, so I switched.
I could focus on challenging problems instead of fighting with the language.
I'm personally leaning towards C or Javascript — which are in a sense total opposites — but they both have interesting strengths for first learners.
C is great because it's statically typed and it's hyper-simplicity allows students to really grasp the fundamentals of programming and how a program works. On the other hand Javascript and the web stack allows people to quickly do something fully interactive, and I think this can be really motivating.
At my former high-school there was one CS teacher that basically only taught students how to do math in Java. Naturally, a lot of students quickly lost interest as a result.