The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
Just spent the better part of two weeks trying to find a bug in a Linux bash script (missing ".") and I'm tired of looking for things like a missing equal sign in the middle of an C if statement, missing period in a PHP script, lower case variable name mixed with an upper case variable name, missing brace in a C++ object, undelared function or operator overloading....get my drift?...in other people's code. (Being the perfect programmer, I never make those kinds of mistakes! And I have swamp property if you're interested.)
All too many programming errors are occurring because programming languages, like C, C++, java, etc., trace their origins back to the days when terseness was a desirable quality.
Printing a program listing on an ASR 33 teletype at 10 CPS on a single threaded machine made using braces in C if statements instead of a clear if-then-else-endif highly desirable. (Remember the origins of C?) Those extra 9 characters took TIME to read in and to print out.
So, here's a few of my thoughts: (And please don't be too anal about my examples--I really want to hear how programming languages could be advanced so that I can be more productive.)
Among other things, a New Programming Language should:
1) Be clear and obvious in describing the functionality of the module. The resulting code should almost be language like.
A sentence like "If (A equals 10) then print B as "xx.xx" else B = 0 end".
But, that statement might also be written in a more mathematical syntax (like Fortran) as "If (A = 10) then....". Note the "=" in the second statement does NOT have the implied assignment and resulting TRUE logical decision (Spent 6 months chasing THAT bug!).
2) The language should be portable.
The language should be executable as an interpreted, compiled, scripted or shell'ed running under most commonly available OS's and browsers.
Perhaps Interpreted for testing, Compiled for execution speed, scripted for portability or shell'ed for utility work. Take features from scripting languages like Powershell, bash, incorporate execution speed of C, objectivity of Java or C++ and put them under one roof.
Write a module that runs under IE, Firefox, Chrome, Opera, Windows, Linux, BSD, OS X, or anything else.
3) The code should be almost self-documenting.
Nothing I hate worse than to have to go looking for the a type declaration, a variable definition, a function calling sequence, etc. I don't want to waste my time looking for what is really happening in "Function.Set.Rate(0)". I have spent waaay too much time chasing Other People's Problems only to find out that the Function does more (or less) than the name implies.
4) The language should be largely independent of the data definitions. Weak typing where appropriate, moderate or strong typing if I need it.
Declaring I as a variable means that it could be a string, integer or floating point number at any given time. Declaring I as an integer means that it is an integer and I don't care how many bytes are assigned to it. Declaring I as integer(4) means that I want exactly four bytes assigned to it.
5) The language should incorporate most commonly-used functionality.
Assigning an number value, I with a value 1234, to a string variable, S, would result in S becoming "1234" using commonly accepting promotion and formatting rules. If I want something different, I should be able to override the default with a statement such as "S = I as '00000'".
6) And, finally, it should be easily extensible.
Have a new data type or facility? Add the functionality in the underlying support, not as an set of facility dependent function calls.
As an example: Support for data base systems might be implemented in the language as "Open database 'my_db' as my_db_handle". And "Select my_db_set from my_db_handle where something = 123". Msql, mysql, postgres, etc., might each have their own DB specific implementations in the underlying function. I shouldn't have to care which db system is used.
This could be carried even further using a remote access construct such as 'Open my_db at url as my_db_handle'.
Adding a new database type should be transparent (to the degree possible) to the program.
Additionally, the language itself should be easily extensible for future technology. Example: If an new image-processing technology was to be developed, then the language itself should allow easy implementation of image processing.
These are just some of my thoughts. What's yours? Thoughts? Ideas? Suggestions?
On a less idiotic note, I'm pretty sure I read somewhere that natural language processing on a machine is impossible because it would break one of the Goedel incompleteness theorems. I think the argument goes the machine needs the language to be consistent to actually run on a machine. On the other hand the language must also be complete to express the full range of ideas you might be able to have.