Oh, I don’t know. Three. Wait, four. Five maybe. Literally speaking, JEOZ is around 16,000 lines of code so far. It could use another cleanup I suppose, but not that much, I regularly go back and tidy up loose ends.
But I’m also serious about 4 or 5 “lines” of code, I’m just referring to categories. Several times in the past I’ve tried to think of as few categories for every type of possible Code Statement, and there doesn’t seem to be that many.
- Calculations and Assignments – Algebraic Statements like
x = y + 1
- Structure Definitions – Code Statements that define Variables, Functions, and Properties, as well as Class, Structure, and Interface definitions
- Directional Statements – Jump to another Statement, whether through an If or Switch, some kind of For loop, or a Function call
- Comments – No comment
I know there must be more, but it’s interesting to see how much you can oversimplify it all to see the big picture. There are so many variations of these 3 main concepts that coding appears much more complicated than it is.
It wasn’t until recently that I began looking into Dot Net Framework’s CodeDOM System, the Document Object Model for writing code that creates code. Because eventually I would like to build JEOZ to the point where it can compile standalone executables, without needing Visual Studio. If anything I want to make JEOZ as programmable as possible.
Studying CodeDOM led to learning the definition of Expressions. An Expression is any calculation that returns a result. In a Statement like “x = 1 + 2”, the Expression part of the Statement is “1 + 2”.
I’m not sure where I’m going with this, but it’s something that’s been wandering in the back of my mind for a long time now. It wasn’t until knowing almost all the possibilities that I could really see how few there actually are underneath the surface. I assume most classes would teach you this but I’m almost entirely self-taught. I’m curious if this was obvious to most coders, or if it’s all so overwhelming that it’s hard to see anything simple about it.