Perfect Programming Language?

Started by
114 comments, last by RunningInt 18 years, 5 months ago
Don't get me wrong here, I don't have any intention of actually trying to create the 'ultimate programming language' ;) I just wanted to get some opinions of what would be neccessary features in a perfect programming language. Off the top of my head, here is what I came up with: 1) Must be easily human-readable i.e. straight-forward syntax. 2) Must be easily parsable/compilable i.e. non-ambiguous grammar, only need one toke of look-ahead to resolve. 3) various bits of syntactic sugar, definately templates and operator overloading. 4) try-catch-finally exception syntax. 5) optional garbage collection, i.e. it can be applied or not on a per-object basis. 6) compact std library, fully exception safe, with endian support, I/O, full suite of containers. 7) arrays should be sliceable. 8) else clause on both for and while loops. Interested to hear your opinions SwiftCoder

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Advertisement
COBOL fits most of those. Enjoy!
Quote:Original post by Sneftel
COBOL fits most of those. Enjoy!


Interesting, I will have to give it a spin.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by swiftcoder
5) optional garbage collection, i.e. it can be applied or not on a per-object basis.
8) else clause on both for and while loops.

How the heck would those work? o_O
Lisp or Smalltalk for me. I use other languages out of necessity, but Lisp dialects and Smalltalk are pretty damn near the top in my language perfection tower.
Quote:Original post by OrangyTang
Quote:Original post by swiftcoder
5) optional garbage collection, i.e. it can be applied or not on a per-object basis.
8) else clause on both for and while loops.

How the heck would those work? o_O


The else clause on for and while loops only executes if the loop performed zero iterations:
for (int i = 0; i < array.size(); i++); // do something to the array contentselse; // the array is empty


as for per-object garbage collection, I am thinking of a flag to new:
MyClass *ptr = new(DO_NOT_GARBAGE_COLLECT) MyClass();

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Quote:Original post by OrangyTang
Quote:Original post by swiftcoder
5) optional garbage collection, i.e. it can be applied or not on a per-object basis.
8) else clause on both for and while loops.

How the heck would those work? o_O


i can see how the optional garbage collection would work.

but else on a for loop?

do you mean if the loops control statement is false?

e.g. ( suggested syntax ? )
[ source lang = "WTF MKII" ]for( int i = 0 ; i < 10 ; ++i ){// code here}else{  // i is greater than or equal to ten ???}

BTW, as a c/c++/Java coder, this style sickens me :)

suppose i could get used to it...

EDIT: just read your response...
By the way, if memory serves right, Python supports else clauses in while. Maybe in try/except blocks too. Check the documentation.
Support for a functional programming style, and lambda functions.
MumbleFuzz
The perfect language for me would write all it's code itself and do the right thing
and nobody would know I had it but me. My boss would be amazed how fast I could write perfect code everytime, I would win big and everyone would love me too.
"It's such a useful tool for living in the city!"

This topic is closed to new replies.

Advertisement