|I do a lot of development, migrating, porting, etc., in different environments, different systems, different languages, different versions,....get the idea? I have specialized over the years in doing weird stuff.
I just finished chasing a bug in some vintage commercial software that was written to accommodate big-endian and little-endian integers depending on the platform.
It turned out be that it applied big-endian logic in one place where little-endian was required.
The why's and wherefore's of doing this are not important. What is important is the line of thought I reached upon conclusion, i.e., What I want to see in software.
1) I want to be able to declare my variables of a type and then have the necessary conversions take place automatically.
E.g., I want to declare a "X" as a 2-byte integer and "S" as an ASCII (or utf8, utf16, whatever...) character string and be able simply specify 'S = X AS "format" --not "S =X.toString("fmt");", "S = itoa(i);" or whatever language conversion functions are appropriate.
I know what I have going in, I know what I want coming out--make it easy to get from A to B!!
2) I want my data declarations to be consistent across all platforms/languages/environments/...!
Before some reader gets all hot and bothered about using C typedefs, etc., in declarations, I know this can be done.
What I want is consistency--i.e., a "short" to be a 2 byte integer, a "long" to be a 4 byte integer,....get the drift. Part of problem I was chasing had to do with the software expecting a C int to be 32 bits, but some 64 bit environments define an int as 64 bits
3) I want my utilities and commands to operate the same way, with the same results, across all platforms.
If I do a "myutil -x" command on Linux, I want to see EXACTLY the same output and results across cygwin, Windows 10 Ubuntu, Debian, etc.
4) I want clear, simple, understandable, comprehensible programming constructs.
I am tired of chasing errors such as where somebody fat-fingered "=" when "==" was meant or where a brace was misplaced or omitted. I want to be able to look at a piece of code and understand what the author intended easily and clearly.
5) I want clear, complete commercial documentation.
I have seen thousands of circular definitions such as:
returntype FunctionXYZ(int p1, int p2); Returns XYZ of p1 and p2.
BIG WHOOPING DEAL! I'm not an idiot--I can plainly see that from the function call. I often need to know HOW it uses p1 and p2 to arrive at XYZ. (Of course, by now, some readers will be questioning the part about "idiot", but that's OK).
Somebody once said there's a beautiful language inside C++ just waiting to get out. I agree. But, C++ has gotten overly complex, overly confusing. (I ask you to consider why there are development environments such as wxWidgets, QTCreator, boost and std::... )
My desire is to "eschew obfuscation."
So, if someone plans on responding defensively or criticizing--Don't.
I am looking for ideas, things that people would want or would like to see done differently so that we can be more effective, more productive and more competent.
What's your thoughts?