Kevin Vance - I am templatizing a class. I am hating C++ very much, and I will…

Entries | Archive | Friends | Friends' Friends | User Info

12:37 am

Wednesday, March 13th, 2002
Previous Entry Share Next Entry
I am templatizing a class.

I am hating C++ very much, and I will never never never write anything with it unless I'm forced to.

(5 minutes later) Fine, I'm being a little harsh on C++, since the actual mistake was a logic error on my part. I still don't like it :)
Link )Reply )

[User Picture]From: gregw
2002-03-12 09:42 pm (UTC)

Yup . . .

if it weren't for those jerks bugging you about that handhelj conduit.

Oh, wait, I'm one of those jerks.

If you hate C++ so much, what do you usually write in?
(Reply) (Thread)
[User Picture]From: kvance
2002-03-12 09:50 pm (UTC)

Re: Yup . . .

Hahaha... I'll write it, I will!

I usually write code in plain jane posix compliant good old fashioned C :)
(Reply) (Parent) (Thread)
[User Picture]From: gregw
2002-03-12 10:01 pm (UTC)

That's what I heard from most C programmers

when C++ came out. They said it felt like C with the OO stuff tacked on as an afterthought. Most of them went to using SmallTalk to get their object-oriented code written.
(Reply) (Parent) (Thread)
From: zixyer
2002-03-12 10:29 pm (UTC)
templates are horrible and pointless. C++ is a just plain awful language. you can usually write OO code in C anyway.
(Reply) (Thread)
[User Picture]From: bitman
2002-03-12 11:43 pm (UTC)
If compiling templates wasn't such a pain they would be very useful. Instead they are uncharacteristically rigid.
(Reply) (Parent) (Thread)
[User Picture]From: bitman
2002-03-12 11:41 pm (UTC)
I like C++. I've found several situations when writing KevEdit where I wish I could use an object model. The problem comes when writing a program in C++ using C techniques; it just looks like classes were used as an afterthought. Unless you plan to embrace the OOP model, you might as well stick with C. But I can't see how to easily pull off polymorphism (my favourite concept of all) in C with the same effectiveness as in C++.
(Reply) (Thread)
[User Picture]From: jzig
2002-03-13 10:49 am (UTC)
Bah, C++ has its uses. What's your problems with templates, they're fine as long as you remember to put all of it in the header file :P
Anyway, C++ is far superior to polymorphism in C. Witness the Mentalguy mzx 2.7 code. Nothing against mentalguy, but his use of polymorphism and inheritance in plain ol C made it basically impossible for me to read and change the code. Were I to redo mzx 2.7, I would probably do a full OOP treatment, and drop libggi for sdl.
(Reply) (Thread)
From: thp
2002-03-13 01:02 pm (UTC)
This is why C++ is evil.
(Reply) (Thread)
[User Picture]From: techpimp
2002-03-13 11:54 pm (UTC)
The main reason C++ is evil is because it is OOP.

Honestly, OOP is not always the answer, and for a variety of reasons.
(Reply) (Parent) (Thread)
[User Picture]From: bitman
2002-03-14 05:35 pm (UTC)
Yes! OOP isn't always the answer; it's too high-level and conceptual for many tasks. Which is why C++ is so cool -- it can do both OOP and procedural code, or interface w/ plain old C fairly easily.

Then there's java...
(Reply) (Parent) (Thread)
From: thp
2002-03-16 07:49 am (UTC)
You're preaching to the choir. I've been trying to argue that OOP isn't always the answer for like years. And everyone around here is like "NOOOOO OOP IS OUR GOOOOOD" and ignores me.
(Reply) (Parent) (Thread)