berkus wrote:Of course,
Code: Select all
units[unit].zd = delta_squared(units[unit].xc, cam.x) + delta_squared(units[unit].yc, cam.y) + delta_squared(units[unit].zc, cam.z);
That's a practical example of why you might use something other than assembly language for your operating systems. I'm not even sure if you get the same result, but the original was just too flawed to begin with... I believe he actually wanted something more like:
Code: Select all
units[ unit ].zd = ( ( units[ unit ].xc - cam.x ) * ( units[ unit ].xc - cam.x ) )
+ ( ( units[ unit ].yc - cam.y ) * ( units[ unit ].yc - cam.y ) )
+ ( ( units[ unit ].zc - cam.z ) * ( units[ unit ].zc - cam.z ) );
SPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACESPACE
IMHO, I would call your space-indented comment-inline over-
elaborate code way too
fancy, and just not
technological enough.... In which I personally see no use for a
standard in. That kind of coding just gives me a headache no matter how you put it.
Also, I think these kinds of debates are extremely important, and if you're serious about the type of thing you are trying to accomplish, then you should
not take the debates
lightly. There are some serious points from each side, but I'm telling you the
correct way is to never code in such a manner that requires you to ever need the use of elaborate indentations and structures, or else you lose a lot quality in the many languages this applies to. Which renders all previous points from the other side invalid.
I'm not too good at metaphors, but these little things truly are a big deal, and all of you Jedi's know it in some way, or else we wouldn't be here discussing it. The conflict between the light and the dark force is your personal preference and habits. This
little thing might not be important to most people, but it's extremely important if you want to be Jedi. Many ideals, techniques, and practices
in theory can be formed from this one
little thing. The dark force's way of blasting through one of those big heavy metal security doors could be much more bloated and inefficient that the light force's way of do it, all because the dark force didn't want to use tabs.
Sorry all of you Star Wars fans, I hope I didn't mess that up...
Honestly though guys... What are we talking about here??
Syntax... We're not even talking about the actual
language itself. Just make it neat, very readable, don't go crazy with the spaces, and don't get too fancy so your code doesn't align on other text editors. Now let's get serious and make a standard on a language, or a framework, or a library, or an API. Take your pick. We'll make it simple enough, so that if you ever would need to indent with spaces it would be because of comments at the end of the line... And then we'll all just laugh at those people who do that.