C is better !!!!
-
None of the abovementioned languages (C, C++, C#, VB) are very good, IMHO, but C++ is among other things a better C. Not much better C, granted, but still better.
Nemanja Trifunovic wrote:
None of the abovementioned languages (C, C++, C#, VB) are very good
So what's your definition of a very good language then? I thought you were a C++ worshipper?
Kevin
-
Nemanja Trifunovic wrote:
None of the abovementioned languages (C, C++, C#, VB) are very good
So what's your definition of a very good language then? I thought you were a C++ worshipper?
Kevin
Probably he is an F# lover now.
-
Nemanja Trifunovic wrote:
None of the abovementioned languages (C, C++, C#, VB) are very good
So what's your definition of a very good language then? I thought you were a C++ worshipper?
Kevin
Kevin McFarlane wrote:
I thought you were a C++ worshipper?
Wow! I don't worship programming languages. C++ lets me do my job, but I wouldn't call it a good language: first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.
Kevin McFarlane wrote:
So what's your definition of a very good language then?
Don't know the definition, but some of the languages I like (low-level to high-level) are: Ada, Modula-2, OCaml/F#, Haskell, Dylan, Scheme. Mind you, I've never done anything serious with any of them, and I wouldn't pick any of them for any serious project. If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA.
-
Probably he is an F# lover now.
Rama Krishna Vavilala wrote:
he is an F# lover now
:) I like F#, but wouldn't really bet any money on it's success.
-
Can you please tell me some of holes? I have done embedded coding in C and C++. In C you can use files in which source codes can act as classes and you can write application and do not use OOP features. Once upon a time, i heard from a guy " C++ is C with another syntax!".At the time,for the desktop i was using C# and for a embedded application C++. Now Iam using C in linux and altough IDEs are not as good as VS, i think that guy's opnoin was correct.I love coding in C which i think simplifies thinking; All in all There are some rules you must obey, no matter you use OOP or structured programming, etc.
Behzad
Behzad Sedighzadeh wrote:
Can you please tell me some of holes?
One that really bothers me is implicit casting of pointers to void*
-
Kevin McFarlane wrote:
I thought you were a C++ worshipper?
Wow! I don't worship programming languages. C++ lets me do my job, but I wouldn't call it a good language: first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.
Kevin McFarlane wrote:
So what's your definition of a very good language then?
Don't know the definition, but some of the languages I like (low-level to high-level) are: Ada, Modula-2, OCaml/F#, Haskell, Dylan, Scheme. Mind you, I've never done anything serious with any of them, and I wouldn't pick any of them for any serious project. If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA.
Nemanja Trifunovic wrote:
first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.
Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.
Nemanja Trifunovic wrote:
If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA
The only one I really hate in that list is Perl. My first experience of it was having to maintain the code of a developer who had left. I would always leave for home at the end of the day in a foul mood. It was quite common to identify a bug, know algorithmically how to fix it but then struggle with the actual Perl implementation! :mad: I'm not especially fond of JavaScript. I like C#. Of the languages I've actually used to at least "Hello World" level the one I've liked most is Eiffel (for which Ada is one influence). I've played with F# a little but find it quite tough. It's not as accessible as Scala. It might just be a superficial syntax thing, and I've not tried either seriously, so maybe Scala becomes equally scary once you get into realistic usages.
Kevin
-
Rama Krishna Vavilala wrote:
he is an F# lover now
:) I like F#, but wouldn't really bet any money on it's success.
Nemanja Trifunovic wrote:
I like F#, but wouldn't really bet any money on it's success
It will probably be picked up by the investment bankers at least. I have a friend at Barclays Capital who managed to get Don Syme in for a talk.
Kevin
-
harold aptroot wrote:
who needs inheritance when you have copy and paste?
That's sig material!!! :) In fact, I'm pretty sure that's the title for an article, if not a book :)
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?
-
I have written applications in C/C++ for embedded and C#/VB for enterprises.When it comes to choosing between C and C++ for an application i always go to C, no matter how much much much features C++ has
Behzad
Horses for courses. I use a lot of both. STL is very usefull, MFC a godsend, and direct memory referencing in C very powerfull. I am not such a fan of virtual classes, so called reference variables (its just a damn pointer OK!), but function overriding can be usefull if used wisely.
Morality is indistinguishable from social proscription
-
harold aptroot wrote:
who needs inheritance when you have copy and paste?
If you are going to steal my quotes at least have the decency to attribute the m to me. ;P
Morality is indistinguishable from social proscription
-
Well, you could use the C++ compiler as a better "C" (i.e. only use the "C" features). That fixes many of the holes of "C". I'm interested to understand your reasons for excluding "C++" from consideration though.
Fight Big Government:
http://obamacareclassaction.com/
http://obamacaretruth.org/C is limited in its support for complexity management in my opinion. For a very large project, C++ provides the kind of OO facilities necessary to make the project understandable at any level of abstraction.
Fight Big Government!! Big Business Needs Less Competition And Is Not Capable Of Constituting An Oligarchy!
-
Nemanja Trifunovic wrote:
first of all it is build on foundation of a really bad language (C) and it really can't go too far in fixing its flaws without breaking the compatibility. It is hard to learn, full of surprises, and the syntax is so complex that it is very hard to make good tools.
Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.
Nemanja Trifunovic wrote:
If a job needs to be done I always end up with ugly languages: C++, Perl, JavaScript, C#, VBA
The only one I really hate in that list is Perl. My first experience of it was having to maintain the code of a developer who had left. I would always leave for home at the end of the day in a foul mood. It was quite common to identify a bug, know algorithmically how to fix it but then struggle with the actual Perl implementation! :mad: I'm not especially fond of JavaScript. I like C#. Of the languages I've actually used to at least "Hello World" level the one I've liked most is Eiffel (for which Ada is one influence). I've played with F# a little but find it quite tough. It's not as accessible as Scala. It might just be a superficial syntax thing, and I've not tried either seriously, so maybe Scala becomes equally scary once you get into realistic usages.
Kevin
Kevin McFarlane wrote:
Have you read Ian Joyner's C++ Critique 3rd Edition[^]? It's rather old now (1996) but worth a skim.
Yep - that's one of the best texts on the topic (much better than the popular "FQA"). However, I still disagree with many of the points he makes - he is comparing C++ with high-level OO languages like Java and Eiffel, but that's not where it belongs; pretty much the only real competition to C++ today is (unfortunatelly) C. At the time this text was written, Ada was still a major player so maybe it would have been better to compare C++ with Ada.
-
I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?
Why talk about the OO advantages and so on with respect to languages; OO is a methodology not a language. You can write NON-OO (random function) programs with C++ just as much as you can write OO programs including full inheritance (single and multiple) using C (with not overwhelmingly more effort). The main reason for using C++ over C for OO programs is that your OO structures are syntactically checked by the compiler whereas they are not for C and, of course, you have the battle hardened STL library to use. I've only used C recently once, for a DSP project, where the C++ compiler turned out to be useless.
-
Why talk about the OO advantages and so on with respect to languages; OO is a methodology not a language. You can write NON-OO (random function) programs with C++ just as much as you can write OO programs including full inheritance (single and multiple) using C (with not overwhelmingly more effort). The main reason for using C++ over C for OO programs is that your OO structures are syntactically checked by the compiler whereas they are not for C and, of course, you have the battle hardened STL library to use. I've only used C recently once, for a DSP project, where the C++ compiler turned out to be useless.
-
I dont see a huge difference between them, and the 'benefits' of C++ are questionable, who needs inheritance when you have copy and paste?
If you are writing code, there is no difference between copy paste and inheritance. If that code has to be maintained then there is a huge difference. It is n times worse where n equals the number of copy pastes. That assumes you know where all of the instances are. Single source is always better.
-
If you are writing code, there is no difference between copy paste and inheritance. If that code has to be maintained then there is a huge difference. It is n times worse where n equals the number of copy pastes. That assumes you know where all of the instances are. Single source is always better.
-
Its also a quote from me. Let me remind the person that plagarism deserves and original source quote.
Morality is indistinguishable from social proscription
-
I have written applications in C/C++ for embedded and C#/VB for enterprises.When it comes to choosing between C and C++ for an application i always go to C, no matter how much much much features C++ has
Behzad
Why not be a real man and use machine code?
Steve
-
Can you please tell me some of holes? I have done embedded coding in C and C++. In C you can use files in which source codes can act as classes and you can write application and do not use OOP features. Once upon a time, i heard from a guy " C++ is C with another syntax!".At the time,for the desktop i was using C# and for a embedded application C++. Now Iam using C in linux and altough IDEs are not as good as VS, i think that guy's opnoin was correct.I love coding in C which i think simplifies thinking; All in all There are some rules you must obey, no matter you use OOP or structured programming, etc.
Behzad
It depends on the compiler. Most compilers on embedded system don't have good warnings in C++, so you are on your own anyway. You need good optimization on embedded systems, since poorely optimized C++ tends to eat up all the space you have. The STL is useful some times, but if it comes to predictable timing, you cannot rely on it. So using C for embedded projects looks not that bad.