Improving Procedural Languages

Tips and suggestions that improve the usability of procedural languages:

     var foo[];
     foo.bar = 'blah';
     foo.bar.snig = 7;
     foo['bar']['snig'] = 7; // equiv to prior, allows punctuation in "keys"
     print(foo.bar);  // result: blah
     print(foo.bar.snig); // result: 7  (some langs don't allow this)

    (ret, errCode) = myFunct(blah);


This list is turning into a general language feature wish-list. It was originally intended to make it easier for procedural to compete with the likes of OOP and FunctionalProgramming without becoming them.

[So... You'd also like to turn a bicycle into a car without an engine or four wheels?]

RE: "This list is turning into a general language feature wish-list. blah blah blah" -- Nested functions, multi-line text quoting, multiple returns, named parameters, and flexible data structures - i.e. everything you listed - are also general language feature wishes, buddy, so halt that whining. And all of the features named above certainly would help any procedural language compete with or surpass an OOP/FunctionalProgramming language that lacks them, and none of the features named above make the language 'become' functional or object oriented.

I'm not sure I entirely agree. OOP could use attributes instead of named parameters, for example. One could argue named parameters are not orthogonal enough with an OOP attributes. (Then again, one could also use associative arrays instead of named parameters, but there is also overlap between objects and associative arrays, especially in dynamic languages. The boundary between paradigms is fuzzy. But that's life.) -t

CategoryProgrammingLanguage, CategorySyntax
AugustZeroEight

EditText of this page (last edited June 22, 2010) or FindPage with title or text search