🔒 Locked
A perfect language
Advertisement
Original Post
The thread on what a perfect language is. What would the perfect programming language have? What would its syntax be like? How would you program in it? From, Nice coder
Ap - That wasn't very nice, now was it?
From,
Nice coder
From,
Nice coder
How both the ability to do the lowest low and the highest high. There is nothing that bugs me more than a movement away from coder responsibility. Yes, having to delete every pointer is annoying, but I WANT to be able to do it. None of this automated, "lets let the machine do it for us" shinanigans.
Then again, there are times where I want to just be able to say "array A + array B = array C" and have the machine understand that I want a[0]+b[0] = c[0], all the way till a[n]+b[n] = c[n].
So the ability to be extremely abstract and extremely nit picky at the same time would make a language complete for me.
Readability is a must for the syntax. I want to be able to SPEAK the code and understand what is going on. C syntax generally works for this.
OOP is required, and Aspect Oriented Programming would be a major plus.
I think that is pretty much it...
Then again, there are times where I want to just be able to say "array A + array B = array C" and have the machine understand that I want a[0]+b[0] = c[0], all the way till a[n]+b[n] = c[n].
So the ability to be extremely abstract and extremely nit picky at the same time would make a language complete for me.
Readability is a must for the syntax. I want to be able to SPEAK the code and understand what is going on. C syntax generally works for this.
OOP is required, and Aspect Oriented Programming would be a major plus.
I think that is pretty much it...
Prepare to be diappointed!
The answer is...it depends. Different languages are good at doing certain things and for certain tasks.
There's no such thing as a perfect language. There might be a very very good language for a specific task, but even that can be improved or rethought.
C++ is a perfect example. It's had quite a few features added to it, such as templates, that make it better than it originally was. So, it wasn't originally perfect. And it's not perfect now.
There are literally hundreds of programming languages. Also, most languages have only been around for anywhere from 10 to 40 years. That's not a horribly long time. Do people really think we'll still be using C or C++ in 150 years?
The answer is...it depends. Different languages are good at doing certain things and for certain tasks.
There's no such thing as a perfect language. There might be a very very good language for a specific task, but even that can be improved or rethought.
C++ is a perfect example. It's had quite a few features added to it, such as templates, that make it better than it originally was. So, it wasn't originally perfect. And it's not perfect now.
There are literally hundreds of programming languages. Also, most languages have only been around for anywhere from 10 to 40 years. That's not a horribly long time. Do people really think we'll still be using C or C++ in 150 years?
I think that the thing is that you can't make a perfect language.
A feature of a language is probably good for one situation but bad for others. For example, C being more low level than python would make fast executables, good for complex games, but python is faster with development and results, so where you won't need much CPU time it would be wiser to use python because you develop faster using python.
C++ is popular because it is somewhat balanced. However many people argue about the many flaws that C++ has.
Specialization is the reason behind the amount of languages out there.
A feature of a language is probably good for one situation but bad for others. For example, C being more low level than python would make fast executables, good for complex games, but python is faster with development and results, so where you won't need much CPU time it would be wiser to use python because you develop faster using python.
C++ is popular because it is somewhat balanced. However many people argue about the many flaws that C++ has.
Specialization is the reason behind the amount of languages out there.
Quote:
Original post by Nice Coder
The thread on what a perfect language is.
What would the perfect programming language have?
What would its syntax be like?
How would you program in it?
It's not so much as there needs to be a perfect language, but rather a perfect programming engine, per se. This programming engine should be able to run in your language of chocie, so first off, in C++. It would basically be C++, but in a Java sense of all the avaliable libraries.
* So it would have easy to use and very powerful compoents, such as audio, input, graphics, etc.. However, what I am describing is not a game engine. It is a programming engine. It should be able to do GUI based programs as well as console based programs easily. It would be the one glove that 'fits all'.
* The syntax would be by default C++. However, the way the engine would work, the user could define their own syntax and use that as they wish. Think about being able to modify the compiler in real time [smile]
* To program something like this, I would use C/C++ mixed in with ASM as well as scripting. I won't go into all the details, but it would resemble just making a game engine, then adding on the non-game stuff, and then packaging it all together.
There is one inheren flaw with your question though. If something such as anyone would image be possible, would it be of disasterous conseuqences to te programming world if adopted?
What I am saying is imagine if everyone could use the Unreal 3 engine. Now it is not that easy to use, but let's say it was made so someone could have a very simple but complete FPS going in about 30 mintues. The same thing would go for other genres. Imagine if people could just use some template's for MMORPGS, Simulators, etc... and have a game done in no time. That would just ruin programming as we know it.
I mean even so right now, you can apply this to something like 3D Game Maker. It is not so easy to use as everyone would want to use it, but can you see what I mean? If we make tools that make programming obsolete, then we are just digging our own graves really.
Ok, I'm done with that little lecture [lol]. Anyways, that's just what I think. [wink]
- Drew
I agree with the comments about specialisation.
With regards to C++, I think the biggest problem holding it back is the difficulty in parsing it. It really holds back tools development for static inspection. Sure, the compiler does a lot for you and Gimpel Lint will help you out, but there are things with other languages and wouldn't bother to do in C++ simply because it's too darn difficult to parse easily.
Edit: I don't know what I meant by "holding it back". I guess I meant "holding my opinion of it down".
Edit2: Drew, it means you can go from implementing frameworks to implementing content. Then you can implement content management systems. Consider html browsers. There are only a few that exist and barely anyone bothers making one. They are used all the time! Did that harm "programming as we know it"? Not at all. It increased it loads except people are writing content.
With regards to C++, I think the biggest problem holding it back is the difficulty in parsing it. It really holds back tools development for static inspection. Sure, the compiler does a lot for you and Gimpel Lint will help you out, but there are things with other languages and wouldn't bother to do in C++ simply because it's too darn difficult to parse easily.
Edit: I don't know what I meant by "holding it back". I guess I meant "holding my opinion of it down".
Edit2: Drew, it means you can go from implementing frameworks to implementing content. Then you can implement content management systems. Consider html browsers. There are only a few that exist and barely anyone bothers making one. They are used all the time! Did that harm "programming as we know it"? Not at all. It increased it loads except people are writing content.
Take the best aspects of C++ and Ada 95, mix in a few good things from Java and C#, and I think we'd have it.
Several things I like about Ada 95 are:
1) Text image-value conversion of enumerated and numeric types built in,
2) Type attributes such as range, useful for array indexing,
3) Nested procedures and functions,
Several things I don't like about Ada 95 are:
1) Frustratingly rigid type safety,
2) Wordiness (i.e. begin, end keywords),
3) Less elegant object oriented structure,
4) It's a dying language.
Several things I like about Ada 95 are:
1) Text image-value conversion of enumerated and numeric types built in,
2) Type attributes such as range, useful for array indexing,
3) Nested procedures and functions,
Several things I don't like about Ada 95 are:
1) Frustratingly rigid type safety,
2) Wordiness (i.e. begin, end keywords),
3) Less elegant object oriented structure,
4) It's a dying language.
Heya,
I'd have to say that if technology keeps progressing at the rate that it is currently, there never will be a perfect programming language, mainly because the way that people use computers will change significantly by that time.
Regardless of how different programming is at this point, I'm going to say that most tasks will be automated by some sort of AI, so if you actually need to describe a process to the computer, it will be just that - a description. You'll say what you want, and the computer will figure out a way to do it, present it to you and check if it's what you wanted and then factor any feedback that you give it into what it does next time.
As an example, for a 3D engine, you might have:
Application Start:
Ask user to select a resolution, colour depth and graphics card from a list of valid resolutions, colour depths and graphics cards.
Using the selected resolution, colour depth and graphics card, create a blank fullscreen window.
Display 3D world from object "startup"
Attached to all of the objects contained in "startup" would be more code on how they would operate in the world. The semantics of how to ask the user for a resolution, colour depth and graphics card would be up to the computer, though it would probably provide a vb-style form designer where you could change things to your liking.
All of this assumes though that we finally get some level of AI, that there is one, global accepted format [or no proprietary formats] for storing and displaying 3D data and a bunch of other things, but it's sort of the kind of way of thinking that I'd expect in maybe a 10-20th generation language. Oh, and when you do get to that level of technology, you'll probably be pretty certain that someone's already come up with a pretty damn good 3d world displayer, so you might as well just use theirs, but put in your own content...
Now I'm just ranting.
CJM
I'd have to say that if technology keeps progressing at the rate that it is currently, there never will be a perfect programming language, mainly because the way that people use computers will change significantly by that time.
Regardless of how different programming is at this point, I'm going to say that most tasks will be automated by some sort of AI, so if you actually need to describe a process to the computer, it will be just that - a description. You'll say what you want, and the computer will figure out a way to do it, present it to you and check if it's what you wanted and then factor any feedback that you give it into what it does next time.
As an example, for a 3D engine, you might have:
Application Start:
Ask user to select a resolution, colour depth and graphics card from a list of valid resolutions, colour depths and graphics cards.
Using the selected resolution, colour depth and graphics card, create a blank fullscreen window.
Display 3D world from object "startup"
Attached to all of the objects contained in "startup" would be more code on how they would operate in the world. The semantics of how to ask the user for a resolution, colour depth and graphics card would be up to the computer, though it would probably provide a vb-style form designer where you could change things to your liking.
All of this assumes though that we finally get some level of AI, that there is one, global accepted format [or no proprietary formats] for storing and displaying 3D data and a bunch of other things, but it's sort of the kind of way of thinking that I'd expect in maybe a 10-20th generation language. Oh, and when you do get to that level of technology, you'll probably be pretty certain that someone's already come up with a pretty damn good 3d world displayer, so you might as well just use theirs, but put in your own content...
Now I'm just ranting.
CJM
A perfect language will probably never be found/created, but you can already find things pretty exceptional in existing languages. Of course, you gotta know which languages are exceptional; C# and Java are not. I believe the perfect language is somewhere between Smalltalk and Lisp.
It has to be dynamically typed with extreme reflection: you don't need to have to convince the compiler that you are doing the right and you need to be able to know as much about a running program as possible so that you can add stuff at runtime. A development environment similar to that of Smalltalk or Lisp Machines or even possibly Self would also be a major advantage.
It has to be dynamically typed with extreme reflection: you don't need to have to convince the compiler that you are doing the right and you need to be able to know as much about a running program as possible so that you can add stuff at runtime. A development environment similar to that of Smalltalk or Lisp Machines or even possibly Self would also be a major advantage.
Yes. A "Trust me on this" Option on any compiler would be realy nice.
From,
NIce coder
From,
NIce coder
Quote:
Original post by flangazor
No, programmers cannot be trusted. That's why most modern languages do away with dangerous things for programmers like pointers.
I agree with pointers, especially since there are many language features which can make them less useful. However, I was talking more about static typing, where you can't run a program unless you prove to the compiler that you are right.
For an example, take this line of code from O'Caml, a very strict static typing language:
let sqroot = int_of_float (sqrt (float_of_int num));;We start with num, an integer from which we want to get the square root. However, the sqrt function only accepts floats, so you have to convert num to float, then do your square root, then go back to an integer (because we'll be using num in an integer-only context later on in the program.)
That's one case of the programming language just putting sticks in your wheels. Sure, it can help you take care of some bugs, but in the end I think it's too restricting. That's why I prefer languages like Ruby or Smalltalk, where you are definitly not tied down, you can do things you know are right, even if the compiler wouldn't agree with you.
In my opinion.. the compiler is what determines the quality of a language, not the syntax. If you want to have a language which is 'syntactically perfect' either Java or C++ ( C++ has a LOT more but java doesn't incorporate the messy stuff like C++ does with C ) but really.. I have yet to see a compiler that really impresses me. Microsoft compilers bloat your executables with unneccessary utility functions and excessive amounts of unneeded space.. and some others sacrifice quality for speed. If there was a compiler which made small file-sizes, executed very quickly and was very efficient in it's machine code build.. then perhaps we'd have a perfect language.
I would say that ascript would be very close to perfect.
All is one (hindu programming language :))
All is accessable
All is changable
All of the programs are just lists. Functions are lists, variables are lists, lists are lists, and theres only two types of punctuation ()'s and ,'s, and there all for lists.
From,
Nice coder
All is one (hindu programming language :))
All is accessable
All is changable
All of the programs are just lists. Functions are lists, variables are lists, lists are lists, and theres only two types of punctuation ()'s and ,'s, and there all for lists.
From,
Nice coder
Quote:
Original post by Justin2006
In my opinion.. the compiler is what determines the quality of a language, not the syntax.
There is a large price to pay for sacrificing programmer productivity in exchange for "the compiler" satisfying some arbitrary need that you have concocted. In the end, programmers spend hours a day dealing with syntax. How many hours a day do you dedicate to compiling? (Trick question, from the sounds of it you use refridgerator magnets to manipulate bit patterns on the hard drive platters since anything else is just abstraction getting in your way).
Quote:
If you want to have a language which is 'syntactically perfect' either Java or C++ ( C++ has a LOT more but java doesn't incorporate the messy stuff like C++ does with C ) but really.. I have yet to see a compiler that really impresses me.
C++ is syntactically perfect? Jesus man, you must be a washed up COBOL programmer, C++ is an ugly hack. I dont know HOW you could make that statement unless you have no experience in other languages.
Quote:
Microsoft compilers bloat your executables with unneccessary utility functions and excessive amounts of unneeded space.. and some others sacrifice quality for speed. If there was a compiler which made small file-sizes, executed very quickly and was very efficient in it's machine code build.. then perhaps we'd have a perfect language.
What the hell are you talking about man? You sound like some guy who watched a segment on 20/20 and all of a sudden has become an expert.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement