|
|
|
|
|
by skydhash
396 days ago
|
|
So why do we have Java, Kotlin, Scala, Groovy, and Clojure, all targeting the JVM? And many such families? The only thing that matter to the machine is opcodes and bits, But that's alien to human, so we map it to assembly. Any abstractions higher than that is mostly for reasoning about the code and share that with other people. And in the process we find some very good abstractions which we then embed into programming languages like procedure, namespacing, OOP, patterns matching, structs, traits/protocols,... All these abstractions are good because they are useful when modeling a problem. The some are so good then it's worth writing a whole VM to get them (lisp homoiconicity, smalltalk's consistent world representation,...) |
|
Saying that reading code is the point of writing code is crazy, that's like saying the point of writing scripts is to read them, or the point of writing sheet music is to look at it.
No - the point of writing a script is to have it performed as a play, the point of writing music is to hear it and enjoy it. The point of writing code is to run it.
> All these abstractions are good because they are useful when modeling a problem.
Then what do you do after modeling the problem? You solve it! You run the program! Everything is in service to that.