The perfect programming language?
The recent discussion about C vs. C++ in this forum (see "C''s daddy can beat up C++''s daddy") got me thinking. For me, neither C nor C++ can offer everything I''m looking for in a programming language.
I know that no language can be all things to all people, but I''d like to hear your opinions on this: if it were up to you, what would the perfect programming language look like?
Tom Nuydens delphi3d@gamedeveloper.org www.gamedeveloper.org/delphi3d
C++!
"That's not a bug, it's a feature!"
--me
"That's not a bug, it's a feature!"
--me
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
- Comfortable, short syntax ( like C/C++/Java )
- Supporting all O.O. paradigms
- Supporting Interfaces
- Generic Programming ( Templates )
- Higher-Order Functions ( functions can be passed around as arguments and variables )
- Good preprocessor/Editor.
People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
October 26, 2000 06:29 AM
I think Java is a (very small) step in the good direction:
- no requirement to do class definitions. It''s somethimes
pretty annoying in C++.
- garbage collection, though I thing this is a discussion on
it''s own. It has a lot of advantages but also
a lot of disadvantages !!
- The javadoc tool, is pretty cool.
- platform independent (well it should be, it really isn''t:
try to make a game/applet which runs on a Mac, PC both
with internet explorer. with sound etc).
- The interface concept is a nice feature..
But it''s also a very big step backward:
- multiple inheritance.
- MACRO''s why not macro''s it''s great to have them:
conditional compiling
- no out parameters in functions. Why ???
- real compilation (not interpreted). When writing state of
the art videogames it would be nice to be able to compile
it.
- good API''s like openGL
- the threading in Java is crappy, it needs a lot of redesign.
- good sound support.
C++ has got som things which should / could be better:
for example java:
void abstract methodName();
is in C++:
void methodName() = 0;
Which person ever came up with ''=0''?? It''s isn''t logical. All specifiers need to be specified before the method name (like virtual / static etc) except ''=0'' ????
Well I could go on and on..
At the moment the perfect language isn''t created yet.
Well at least for me..
I think it''s a very personal and depending on the project...
So I doubt it will be ever possible to talk about the perfect lanuage...
Rick
- no requirement to do class definitions. It''s somethimes
pretty annoying in C++.
- garbage collection, though I thing this is a discussion on
it''s own. It has a lot of advantages but also
a lot of disadvantages !!
- The javadoc tool, is pretty cool.
- platform independent (well it should be, it really isn''t:
try to make a game/applet which runs on a Mac, PC both
with internet explorer. with sound etc).
- The interface concept is a nice feature..
But it''s also a very big step backward:
- multiple inheritance.
- MACRO''s why not macro''s it''s great to have them:
conditional compiling
- no out parameters in functions. Why ???
- real compilation (not interpreted). When writing state of
the art videogames it would be nice to be able to compile
it.
- good API''s like openGL
- the threading in Java is crappy, it needs a lot of redesign.
- good sound support.
C++ has got som things which should / could be better:
for example java:
void abstract methodName();
is in C++:
void methodName() = 0;
Which person ever came up with ''=0''?? It''s isn''t logical. All specifiers need to be specified before the method name (like virtual / static etc) except ''=0'' ????
Well I could go on and on..
At the moment the perfect language isn''t created yet.
Well at least for me..
I think it''s a very personal and depending on the project...
So I doubt it will be ever possible to talk about the perfect lanuage...
Rick
MadKeithV: good points, except for the preprocessor. That would actually be the FIRST thing I''d get rid of. Why would anyone want to have one of those? Furthermore, I think a good reflection API could be very useful (like Java''s).
BTW, can anyone comment on the merits (or lack thereof) of other (non-OOP) programming paradigms, like functional programming? (I should try it out for myself - I know...)
BTW, can anyone comment on the merits (or lack thereof) of other (non-OOP) programming paradigms, like functional programming? (I should try it out for myself - I know...)
Tom Nuydens delphi3d@gamedeveloper.org www.gamedeveloper.org/delphi3d
The "higher order functions" are a functional programming item. It's one of the basics of functional programming in fact, but it can be integrated into procedural languages. I believe ML has done this.
The reason I want a good preprocessor is because of conditional compilation and the like...though you may be right in that it is unnecessary.
API's are not on my wishlist, since they are not part of the language, but they ARE important. So any good language should have a good graphics, sound, networking and user interfacing library available...
People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~
Edited by - MadKeithV on October 26, 2000 7:43:59 AM
The reason I want a good preprocessor is because of conditional compilation and the like...though you may be right in that it is unnecessary.
API's are not on my wishlist, since they are not part of the language, but they ARE important. So any good language should have a good graphics, sound, networking and user interfacing library available...
People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~
Edited by - MadKeithV on October 26, 2000 7:43:59 AM
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Best programming language? Simple answer, there is no general language that is better than all the others. And in what way you a certain language be better than any other? The question is so complex!
If you define "speed of program execution" as the best language, then there is nothing that can beat the assembly languages. But note that it is in plural form! There is tons of assembly languages out there, one for each processor architecture, and I don''t just mean the different Pentuim and AMD families, what about ALPHA processors? And there likes?
So you still can''t answer oine single langue as you are platform dependant.
And if you wan''t to make numerical simulations, then there is tons of programms for that, how about Fortran, or even Haskell or other Function programing languages? Haskell is great for solving VERY complex problems at minimum use of code.
And if you really want to follow the principles of OOP then Java would be great, but C++ and other languages are also OOP "compatible", what determins if one is better than the other? Easy of use? Speed of execution? Complexity of code and problem solving?
imperative program languages? Which one is best there? Well still it is the same arguments. Define "best". There are to many things to consider, almost every language has it advantage, otherwise they would not have been invented!
I don''t think a best general programming language could be decided upon, but "good" languages is better, and more correct to pint out.
The languages I like the most:
For prototyping:
Visual Basic and Haskell ** Quick and easy to write things to test
For solving complex problems: Haskell ** This is really a GREAT language (solve the eight queens problem in 20 lines of code, producing 90 results in less than 1.5 second).
To make compled programs:
C++ And Java ** Well, two good languages since there already exist so meny modules to use in order to produce a program within a reasonable timeframe.
If you define "speed of program execution" as the best language, then there is nothing that can beat the assembly languages. But note that it is in plural form! There is tons of assembly languages out there, one for each processor architecture, and I don''t just mean the different Pentuim and AMD families, what about ALPHA processors? And there likes?
So you still can''t answer oine single langue as you are platform dependant.
And if you wan''t to make numerical simulations, then there is tons of programms for that, how about Fortran, or even Haskell or other Function programing languages? Haskell is great for solving VERY complex problems at minimum use of code.
And if you really want to follow the principles of OOP then Java would be great, but C++ and other languages are also OOP "compatible", what determins if one is better than the other? Easy of use? Speed of execution? Complexity of code and problem solving?
imperative program languages? Which one is best there? Well still it is the same arguments. Define "best". There are to many things to consider, almost every language has it advantage, otherwise they would not have been invented!
I don''t think a best general programming language could be decided upon, but "good" languages is better, and more correct to pint out.
The languages I like the most:
For prototyping:
Visual Basic and Haskell ** Quick and easy to write things to test
For solving complex problems: Haskell ** This is really a GREAT language (solve the eight queens problem in 20 lines of code, producing 90 results in less than 1.5 second).
To make compled programs:
C++ And Java ** Well, two good languages since there already exist so meny modules to use in order to produce a program within a reasonable timeframe.
one of the biggest reasons to use condintional compiling with the pre-processor is for debugging purposes. When you are testing your program, you will want to have alot of information about what is going on inside of the program, not just how it runs. And then when you have finished creating your game, you will want to turn all that debugging information off, so the user wont have access to how your program works internally. Easeiest way.........
now when you compile this program, thenit will print out the debugging information. After your program is finished, merely comment out the #define DEBUG at the top and re-compile and it will skip all the stuff in between
#ifdef DEBUG
and
#endif
and you can have these statements all over the place, in your code in any file and it will work
you can alsohave
#ifndef DEBUG
// stuff
#endif
in this case, it will do the "stuff" if you have the #define DEBUG commented out
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
#define DEBUG...#ifdef DEBUG// print some stuff out here about debugging#endif...
now when you compile this program, thenit will print out the debugging information. After your program is finished, merely comment out the #define DEBUG at the top and re-compile and it will skip all the stuff in between
#ifdef DEBUG
and
#endif
and you can have these statements all over the place, in your code in any file and it will work
you can alsohave
#ifndef DEBUG
// stuff
#endif
in this case, it will do the "stuff" if you have the #define DEBUG commented out
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
ncsu121978: I think the C/C++ preprocessor is pure evil. I won''t argue about the usefulness (or lack thereof) of conditional compilation, but macros just bite.
Personally, I think Pascal does a rather nice job at allowing conditional compilation: you don''t get a full-blown macro preprocessor - just the ability to define a symbol and test against it (ifdef). It lets you do conditional compilation without allowing all kinds of black ''macro magic''.
Then again, Java doesn''t have _any_ means of doing conditional compilation, and I can''t say that I miss it.
Personally, I think Pascal does a rather nice job at allowing conditional compilation: you don''t get a full-blown macro preprocessor - just the ability to define a symbol and test against it (ifdef). It lets you do conditional compilation without allowing all kinds of black ''macro magic''.
Then again, Java doesn''t have _any_ means of doing conditional compilation, and I can''t say that I miss it.
Tom Nuydens delphi3d@gamedeveloper.org www.gamedeveloper.org/delphi3d
Thinking about how to get rid of preprocessor commands: debug-only output can be done through setting a single variable somewhere, that constructs a different kind of exception in debug than it does in release, or something to those lines.
It requires code modification, but then, so does removing the #define DEBUG..
People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~
It requires code modification, but then, so does removing the #define DEBUG..
People might not remember what you said, or what you did, but they will always remember how you made them feel.
~ (V)^|) |<é!t|-| ~
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement