Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

My favorite language is?

BASIC (Visual or other)
10 (14%)
Pascal (Delphi, Lylix)
6 (8%)
C
12 (17%)
C++
23 (32%)
Java
6 (8%)
LISP
1 (1%)
ADA
1 (1%)
FORTRAN
1 (1%)
COBOL
2 (3%)
Others (PROLOG, Assembly, or even wierder....)
10 (14%)
 
Total votes: 72
 
animedown
Gerbil Team Leader
Posts: 212
Joined: Fri Jan 31, 2003 10:12 pm
Location: 70|20|\|70

Wed Feb 12, 2003 11:36 pm

I have to like one? ;)
 
muyuubyou
Grand Gerbil Poohbah
Posts: 3222
Joined: Wed Aug 28, 2002 6:19 am
Location: London, UK or Tokyo/Yokohama, Japan or Madrid, Spain

Mon Mar 03, 2003 5:41 am

Why is C++ a half-assed piece of crap?

Hmm let me see. First off, I have to say C++ is the language I've programmed the most, and I know it by heart, bit by bit. I still prefer C, definitely, or Java, or Smalltalk (if it wasn't for the lack of support), or Objective C+cocoa.

I still HAVE to use it because it's a standard and sell better than any other.
If I run a project myself I go C and maybe ASM if performance is critical. Sometimes Perl, PHP or Java, it depends.

Most of C++'s problems come from it's preprocessor nature. If you want an OO C try Objective C. C++ is a flimsy static patch. Fails at almost everything:

C++ is slow as a compiler (it's merely a preprocessor so it's not surprising, but OK no big deal)
C++ lacks compatibility. To make really portable code it's a real pain in the ass.
Debugging sucks. Most of the error messages (in ANY compiler, it's a matter of language structure) are quite cryptic and you have to guess yourself.
When you're dealing with hardware or complicated structures, you usually NEED to know how the preprocessor itself works (or try a different way). If I have to preprocess in my head to C anyway, I prefer coding C in the first place. Thus the learning curve is endless. You have to deal more with it's intricacies than with the real problem and algorithms.
You program great code in C in just one year if you're dedicated. You program great code in C++ after 5~6 years (as great as it gets) and you don't do anything else or better (OK, support and libraries...)

Seriously, if I have to choose, I prefer C or C-like C++ (when I need some C++ library or port) and ASM chunks if I need performance-critical code. If you need to program seriously in C++ anyway and not just for Winbloze, go C++ paired with QT.

Remember C++ is not M$-Visual C++

C++ is not REAL OO. I can THINK OO and program C anyway far better, effectively and quickly and I have less experience.

--> I still have to know of an expert, intelligent programmer who cares about portability and/or performance and still prefers C++ to anything else.
--> I still have to see C++ code from a big project for several platforms not needing thousands of hacks to work properly. If you have seen one please show me.

Try programming an OS in C++. Java is good at some things. C++ is just premature and outdated for what it tries to be. C# looks better but I just hate too much M$.
----------------
Selecting a programming language made easy:
http://theparticle.com/fun/fun.php?topi ... ng&id=2337
(where's C++? ;) )
no sig
 
IntelMole
Grand Gerbil Poohbah
Posts: 3506
Joined: Sat Dec 29, 2001 7:00 pm
Location: The nearest pub
Contact:

Tue May 06, 2003 2:59 pm

Hmmm... tricky ATM

Started learning to do things on a computer in VBA during GCSE/A-Level projects... boy, was learning a totally new language with no books, no tutor (he had to keep asking another teacher), and the windows help files easy! :-D

Got bored with VBA, since I knew it was a gutless POC, tried looking for a free VB program other than Liberty BASIC (another gutless thing!), gave up when I could only find Liberty BASIC :lol:

Went back to VBA from time to time, recently to help a mate who was publishing a paper on pythagorean triples (i.e. 3,4, for the | and _ sides, and 5 for the / hypotenuse in a triangle)

Started learning C about a week ago using "The C Bible" as it is known, 'The ANSI C Programming Language, Second Edition.' God is that book better than trying to learn a language by yourself! :-D

Currently playing with fahrenheit -> celsius converters and character array manipulation things... chapter 1 and a and a bit of 2...

Of the two, which is my favourite?

C, since a lot of things are done with braces, I can read it a lot easier...
IntelMole
Living proof of John Gabriel's theorem
 
pattouk2001
Gerbil Jedi
Posts: 1903
Joined: Thu May 30, 2002 10:44 am
Location: Birmingham, UK.
Contact:

Tue May 06, 2003 3:34 pm

.....English :wink: .
 
IntelMole
Grand Gerbil Poohbah
Posts: 3506
Joined: Sat Dec 29, 2001 7:00 pm
Location: The nearest pub
Contact:

Tue May 06, 2003 4:08 pm

pattouk2001 wrote:
.....English :wink: .


Think about it this way... I've been learning English ever since I was born... backed up the theory with some duallities from French and Spanish...


AND I STILL MAKE GRAMMAR AND SPELLING MISTAKES!

Hell, assembly is easier than English,
IntelMole
Living proof of John Gabriel's theorem
 
mbrewthx
Gerbil
Posts: 41
Joined: Thu May 01, 2003 2:05 am
Location: Dayton Oregon

Sat May 24, 2003 4:11 pm

Voted for COBOL
Come from a mini computer background (IBM s/36)

know

RPG
COBOL
PASCAL

remember LOGO
_____________
Learning right now Python
going to learn
C++
Perl
JAVA
____________________________________
What's the big deal with alien abductions? everytime I' abducted the aliens leave a little note which reads "You colon is clean".

Thank you Alien Overlords!!!!!!
Mark B
 
Veritas
Gerbil First Class
Posts: 113
Joined: Wed Dec 26, 2001 7:00 pm
Location: Houston, TX
Contact:

Sun May 25, 2003 11:31 am

C++ is slow as a compiler (it's merely a preprocessor so it's not surprising, but OK no big deal)


Just because it started off as a preprocessor does not mean it still is. G++ and VC++ are full blown, binary c++ compilers. I find them no more slower than any C compiler on code bases of similar size.

C++ lacks compatibility. To make really portable code it's a real pain in the ass.


In all the programs I have written that have no dependency on platform specific libraries (i.e. windows vs. xwindows libs), I have never had a problem with this. So , how exactly is it a pain in the ass? What kind of code are you writting that does not compiler between two standard compliant compilers?

Debugging sucks. Most of the error messages (in ANY compiler, it's a matter of language structure) are quite cryptic and you have to guess yourself.


That is pretty subjective. The wording of error messages partially depend on the compiler writer not on C++. I find the g++ compiler errors to be quite clear. VC++ compiler errors confuse me to no end.

When you're dealing with hardware or complicated structures, you usually NEED to know how the preprocessor itself works (or try a different way).


Again, what preprocessor and what complicated structures?

You have to deal more with it's intricacies than with the real problem and algorithms.


What intricacies? I find that your statement applies to C more than C++ with things like loosely typed identifiers and such. Talk about being able to shoot yourself in the foot without even knowing it...

I think C++ makes it easier to concentrate on the algorithms becuase you can just write a quick class to encapsulate the whole thing and test it seperate from the rest of the code.

You program great code in C in just one year if you're dedicated. You program great code in C++ after 5~6 years


You can being doing great C++ in about the same amount of time. You probably won't have the STL completely down, but the language basics should be no problem. With STL give it another year or so to get down, but certainly not 5-6 years.

With all this having been said, python might be my favorite language, but C++ is a close second.
 
Niteslayer
Gerbil Jedi
Posts: 1557
Joined: Tue Dec 31, 2002 6:07 pm
Location: Peoples Republic of Taxachusetts not Romneyville anymore, boy are we screwed!
Contact:

Sun May 25, 2003 12:30 pm

English, all other languages seem like GREEK to ME!
"Klaatu, Barrada Nikto!"
<img src="http://www.sparrowbot.com/Sigs/sig1.php?designer=drfish&sigid=8&user=niteslayer">
 
muyuubyou
Grand Gerbil Poohbah
Posts: 3222
Joined: Wed Aug 28, 2002 6:19 am
Location: London, UK or Tokyo/Yokohama, Japan or Madrid, Spain

Sun May 25, 2003 12:31 pm

The problem is, what standard? I'm talking about Stroustrup definition.

The ISO/ANSI came as late as 1990. I started coding in C++ at the University in year 1994. Was the 4th lang. I took at the University (Pascal, Modula-2, C) not counting some ASM.

Most of the code was 'stroustrup' and not ISO90 . There is too much non-ISO code, because there was "C with Classes" since ~1980 and Stroustrup original C++ since 1985.

ISO C++ is much better but it was already too late. 99% of the compilers are forced to support non-ISO C++ due to the high quantity of legacy code. ISO was too late to be legit. C++ is full of stupid defaults to make it 99% compatible with C code. You find LOTS of C-ish C++.

C++ with some external libs like STL, SDL, openGL, wxWindows, GTK, QT, motif, etc... can be portable. Yeah, they have to deal with huge lots of nasty business to provide you with some compatible framework. But you can't say it's C++ merit. C++ could have been much better. ISO90 is a huge patch itself.

C++ is handy sometimes anyway. I code myself a lot in C++, but when I have to work with somebody else in C++, especially when I don't know him, I know it's going to take time. C++ is great for wrappers. Too bad Java static compilers are not that good, compared to current C++ compilers.

99% of C code is ANSI. C is simple and powerful, lighter and standard. That's why C is the language of choice for most OSs, and not C++.

If you have a project big enough for 10+ people, be sure to a) stay away from C++ b) define the base libs and code since the beginning to make something bearable out of C++

Just because it started off as a preprocessor does not mean it still is. G++ and VC++ are full blown, binary c++ compilers. I find them no more slower than any C compiler on code bases of similar size.


Sorry to break it up to you, but C++ is a preprocessor by definition. That affects it's different compiler passes. If you make a compiler that doesn't work that way, it will compile different things other than what's standard by original Stroustrup's definition. I'm not sure about this point in yr 1990 standard. C++ makes it pretty difficult for the compiler designer. I know this very well because I had to make one as an assigment back in the day (and it was a slightly simplified version so it won't need more than 2 passes - that saved me from templates).

About the speed: you can't notice the difference?? C compilers are usually 2 or 3 times as fast. You can't tell me otherwise because I check this on a daily basis (for instance, compiling C/C++ mixed projects). This is probably no big deal if you don't work in big projects, and as computers are faster. For me, it isn't a big deal right now because I usually work in projects that don't reach the million line mark. With the dually we have in the office we don't have to wait too much (and hey! we have a break to surf the web :D ). But the difference is there.
no sig
 
Mime
Graphmaster Gerbil
Posts: 1190
Joined: Sat May 24, 2003 11:49 pm
Location: A tiny cubicle
Contact:

Sun May 25, 2003 12:31 pm

Perl :P

I feel like such an outcast... :lol:
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Sun May 25, 2003 9:06 pm

C++ is not significantly less portable than C. The GNU compiler can target just about anything.

Compilation speed is less of an issue these days, with faster development systems. Even on big projects, compilation speed should not be a big issue, if the project is reasonably well-structured. You shouldn't be "building the world" every day anyway, on a million-line project.

Sure, it's a bit of a hack... but IMO it is still the best widely supported general-purpose language we've got.
 
LicketySplit
Gerbil God
Posts: 24502
Joined: Sat Jan 19, 2002 7:00 pm
Location: Soap Lake, Wa
Contact:

Sun May 25, 2003 9:16 pm

Que Pasa amigo :wink:
 
Veritas
Gerbil First Class
Posts: 113
Joined: Wed Dec 26, 2001 7:00 pm
Location: Houston, TX
Contact:

Sun May 25, 2003 11:21 pm

Ok, I see what you mean by the fact that it took forever to get an ISO standard. That is a good point. I had not really thought about that because I have only really been doing C++ for the past 4 years or so (I am only 25 :D )

When I think standard C++, I think ISO C++ 1998. Alot of programmers my age think the same way.

On the topic of preprocessors... I had never considered a compiler making several passes over the code as being a preprocessor by definition. By that definition there are several languages that are preprocessors. Perhaps I misunderstood what a preprocessor was...

On the topic of speed: I have never done a c or c++ program with more than 100,000 lines or so. Only projects I have touched with more than a million lines have been all ada.
 
muyuubyou
Grand Gerbil Poohbah
Posts: 3222
Joined: Wed Aug 28, 2002 6:19 am
Location: London, UK or Tokyo/Yokohama, Japan or Madrid, Spain

Mon May 26, 2003 3:23 am

Oh my little boy so you're 25? I'm 26 (27 in October) :D LOL yet I've been programming C++ for quite longer than you.

ISO 1998 is cool. Tough luck it came too late for most of the hardcore professionals, and is even later than Java. Heck, even C# is a good idea (M$ as it may be).

If you're coding all your code on your own you may be well off with that. Tough luck corporations can't do that, and they're who matter the most in the industry.

Python is a good language since the beginning.

Guess we all ranted enough about this topic :D
no sig

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On