3 ms·
Everything we do in any high level programming languages is an illusion. In fact, even assembly language is an illusion. The only thing that isn't an illusion i
by nessus42 14y ago
Everything we do in any high level programming languages is an illusion. In fact, even assembly language is an illusion. The only thing that isn't an illusion is building a computer out of nand gates, and the like.
In my education, we STARTED with functional programming, and eventually we built real microcoded computers that we designed ourselves out of nand gates and adder chips. And, yes, I mean REAL chips with lots and lots of wires on a real physical breadboard.
Is a nand gate, the fundamental building block of all computers, is that functional? You bet your ass it is! State only comes by using this functional component and feedback to make a flip-flop.
Your premises are all wrong: My education started with FUNCTIONAL programming. We then learned how to build OO on top of functional programming, using only closures and single mutation operation: variable rebinding. We then went on to design and build our own physical computers out of chips and wires, starting with the fundamental functional component: a nand gate.
- guard-of-terra 14y agoYou do not program nand gates. You program your cpu. Last time I've checked, it's not Reduceron II but instead AMD64 or ARM cpu. One which is inherently imperative - it's von neumann machine. It has registers, shared writable memory and stuff.
- nessus42 14y agoFirst of all, as I have mentioned, I have implemented programs using real nand gates, with my very own hands, using copper wires and microcode. Furthermore, my CPU is made out of nand gates, so yes I do program nand gates every day. If you deny this reductionism, then I deny your reductionism to the CPU. I don't program the CPU--I program the Scala compiler. My Scala code doesn't run on an AMD64, or an ARM CPU, it runs on ANYTHING, past, present, and future for which the Scala compiler has been implemented. In the future, my program runs on DNA or on neutronium Tinker Toys. Traveling into the past, rather than the future, I have written Lisp code and then compiled it to microcode. P.S. I don't trust the opinion of anyone who hasn't built a computer out of nand gates, as clearly they are out of touch with the hardware. Have you built your own CPU from scratch?
- guard-of-terra 14y ago"I" is the last letter of the alphabet. (lol, it isn't, you got me) What I see in your comments is the constant stream of I's. I, me, I did, I studied, I think this, I think that. Guess what? Nobody cares that much except for you. When talking about basics, we should consider the least common denominator of all programmers' knowledge. You can reason that the basics should be different, but what if you are wrong? You are a smart guy who loves scala, but there are other smart guys who consider scala a failure, for example. And there are guys smarter than you and me who just do it all in C because they can't be bothered with abstractions, and FP is an abstraction in the end. People are different, and if you think that you're such an unique yet the most important snowflake - why? Nobody questions your ability to write successful FP code. So what? What does it prove? Nobody even questions that. But there are people who write FORTH. And there are people who write Prolog. Both groups claim they get much bigger bang for the buck than anyone else. Why do we listen to you and not them?
- nessus42 14y agoYou keep expressing your opinion. Please tell me how there is no "I" in your opinion. I see two of them: o-p-I-n-I-o-n. Also, I never said not to listen to any of these other folks. It was you who told me that I didn't learn to program in my first programming class because it started with functional programming as the most fundamental concept. That statement was offensive and false, and I am now demonstrating to you why you are so wrong. This is not to say that there are not many possible reasonable approaches. I think the one I learned was great. Are there better approaches? Who knows? Certainly not you.
- guard-of-terra 14y agoI didn't really mean to offend SICP. I suspect it's overrated a bit, but since I've never actually tried it I'm not qualified. What I was arguing for, is that you should not call "immutable data structures" and "referential transparency" basics of programming.
- 14y ago