3 ms·
I have this conversation with beginners a lot - in fact I usually use the exact same iterative-vs-functional list construction question. I think it's a good pla
by sgentle 9y ago
I have this conversation with beginners a lot - in fact I usually use the exact same iterative-vs-functional list construction question. I think it's a good place to talk about the generality of computing and what that means.
There are an infinite number of possible computers, an infinite number of possible programming languages, and an infinite number of possible programs you could write to solve a given problem.
When you start out, just finding any way to solve your problem is so exciting that you stop there. When you get a bit more experienced, you start finding more solutions and naturally gravitate to the most clever and interesting ones. Check it out! I can implement all control flow in our Javascript application as an infinitely nested function call expansion with a trampoline!
Yes, you can. But should you?
When there are an infinite number of possible solutions, the fact that you can find one of them is not so impressive. Your skill as an advanced programmer is rather to choose which of those solutions best conveys your ideas. The computer can't perceive meaning, but other people can, and every choice between equivalent solutions is your way of telling them what you were trying to do.
In that sense, it's no different from any other kind of communication. Why are you writing this? Who is it for? What do you want them to get from it? And will it help your goal to drop in some 17th century vocabulary, or construct your sentences entirely without the letter e?