Parent of your comment might have been talking the Structure and Interpretation of Computer Programs. Likely it needs no introduction, but it is absolutely about programming, and goes right down the rabbit-hole to implementing interpreters, virtual register machines, and a compiler for said machine. Yes, the first couple of chapters is mostly purely functional, but that doesn't detract from the rest, which includes mutable code as well.
Really, I don't know why you're so hostile to this pedagogical approach. Do you have experience with teaching CS and/or programming, and have found using C or assembly or following some kind of Java school curriculum more effective? Have you found teaching functional programming first deficient? Or maybe you're looking at this from the perspective of an employer and have had to deal with hiring new grads who are brain damaged by functional intro CS classes?
I, for one, welcome this kind of experimentation or change of pace on the part of CS educators like Robert Harper at CMU (http://existentialtype.wordpress.com/). It can't be worse than what I had (mediocre, big box state Java school)
Yes, the class was SICP. I can't say enough good things about how it influenced my still-forming mind. I went to MIT because I wanted to study black holes and neutron stars, and after this class, I learned that there was something even cooler than that!
I have experience suggesting that to learn programming, you write programs. The hard way, how Zed Shaw calls it.
And when you have enough experience in writing programs with limited success, now you are ready for some theory. You know already to separate bullshit from useful things, for one.
When you never wrote any programs, you would not be able to do that separation, which is bad for you.
Where do you get the crazy idea that you can't write functional programs? Or that SICP didn't have you write programs? SICP didn't start off with "theory"--it started off with PROGRAMMING. The programming that you did at first, however, just so happened to be recursion-heavy functional programming. The class then taught you how to build your own mutable object system out of the functional primitives, using closures and messages.
I clearly got a far better introduction to PROGRAMMING than you did. E.g., I learned how to add an OO subsystem to a functional programming language in my very first programming class.
SICP was a lab class. It nearly killed me with all the programming I had to do. It was billed as a 15-hour-a-week class, but 40 hours a week was more like it. I lived in the computer lab during that class. The intense programming assignments began on the first day, and continued all the way through to the end.
Is there any other way that you would like to continue to advertise your unsubstantiated bias and ignorance on the issue?
And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility?
You can write functional programs. You can also write concatenative programs and logical programs. Why not we suggest that people should be required to learn about beating around the stack and predicates first?
What makes functional programming so special? The hubris of its followers?
I can tell you now what makes imperative programming special. It allows all other kinds of programming to function. And it's the most used kind - by large. So, sorry. Basics are just so big that they won't fit any FP concepts. Loops, variables, procedures, branches, arrays. There you go. Be blessed and do not sin.
P. S. The whole concept of immutability linguistically depends on the default of mutability. Where did that default came from? Math does not have the concept of mutability. It came from imperative programming!
So, we are told that people should learn basic things, whose definition depends on understanding non-basic things.
> And there you go again, as the OP did. Self-praise, deprecation of others. What happened to humility?
That's surely the pot calling the kettle black! First of all, I didn't praise myself--I praised the education that I was fortunate enough to receive. It was first rate. Furthermore I'm not disparaging you because it's necessarily bad to learn imperative programming first. I'm disparaging your willful ignorance, and your knee-jerk assertion that people who learned to program in a different manner from how you learned, didn't learn to program at all.
Your attitude here is offensive and counter-productive.
Regarding what makes functional programming "special" is that it results in code that is easier to reason about, and consequently to maintain and adapt. It also increases the ability to write "reusable" code, which can then be used unmodified in future projects.
On the other hand, FP is not a magic elixir. It is just one of many techniques that a good software engineer should understand. At MIT, when I first was taught to program there as an undergraduate, it was, however, considered to be the most fundamental technique.
Victor Pelevin, a great writer, noted in his book Empire V:
(my translation)
"The main idea that person tries to convey to others is that he has access to much better consumption than they would think. At the same time he tries to tell them that their way of consumption is much less of premium than they were thinking."
And now you're telling me that you had access to much better education and that my education surely sucked ass. It's like the part from Borat's Kazakhstan hymn about Uzbekistan.
I do not argue that FP results in code that is easier to reason about. I'm just aruing that you should not call FP concepts like immutability and referential transparency "basics of programming". Programming is big and basics implies something very small. The kind of taking with you to an uninhabited island.
Demanding everyone to pray to functional gods before they are allowed to learn any programming, as OP implied, is a naive and dangerous dream. You're not alone in this, please behave.
> And now you're telling me that you had access to much better education and that my education surely sucked ass.
Your education is obviously lacking because you say uneducated things. It's as simple as that.
For instance, you asserted that if someone's first programming class started off with functional programming, then they didn't learn to program at all. That assertion is offensive, uneducated malarky. The quality of your education speaks for itself.
As to what people should have to do before learning any programming: no one has implied any such thing.
"As to what people should have to do before learning any programming: no one has implied any such thing."
"People should be required to learn the basics of programming first. They should start with immutable data objects, referentially transparent functions."
You either lie or "should" means different thing in your English than "should".
As to that quote, firstly you give it stronger weight than it was intended to convey. It was someone's opinion on the best way to educate, not a statement about use of force to allow or disallow anything.
More importantly, that quote is neither here nor there in the discussion between you and me. I did not utter it, you did not utter it, and the OP did not utter it. Therefore it is irrelevant without you having alerted me to what particular bee you have in your bonnet.
Additionally, it almost certainly true that any first class in programming should start with numbers, which are immutable data objects, and mathematical functions, which are referentially transparent.
E.g.,
def inc(x): return x + 1
Consequently, there is nothing at all incorrect about that assertion.
In any case, I am done with this conversation, and in conversing with you. You have a very rigid and myopic and, yes, ill-educated opinion. I do not wish to converse with you further.
Parent of your comment might have been talking the Structure and Interpretation of Computer Programs. Likely it needs no introduction, but it is absolutely about programming, and goes right down the rabbit-hole to implementing interpreters, virtual register machines, and a compiler for said machine. Yes, the first couple of chapters is mostly purely functional, but that doesn't detract from the rest, which includes mutable code as well.
Really, I don't know why you're so hostile to this pedagogical approach. Do you have experience with teaching CS and/or programming, and have found using C or assembly or following some kind of Java school curriculum more effective? Have you found teaching functional programming first deficient? Or maybe you're looking at this from the perspective of an employer and have had to deal with hiring new grads who are brain damaged by functional intro CS classes?
I, for one, welcome this kind of experimentation or change of pace on the part of CS educators like Robert Harper at CMU (http://existentialtype.wordpress.com/). It can't be worse than what I had (mediocre, big box state Java school)