Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » rant about the state of c++ software

This thread is locked; no one can reply to it. rss feed Print
rant about the state of c++ software
Steve++
Member #1,816
January 2002

Quote:

It seems like a very biased chart, to say the least.

What would you expect from crusty old nerds living in the past? The difference between them and the rest of us is that in 20 years time we won't be arguing why Java/C# is superior to the next big language/platform/paradigm.

Neil Black
Member #7,867
October 2006
avatar

It's superior because Change Is Bad(tm), and the familiar is comfortable.

axilmar
Member #1,204
April 2001

Quote:

So the GIMP and Photoshop are big/major software according to the link. Then surely Paint.NET is as well, which is written in C#. So you've disproved your point. That's all.

GIMP and Photoshop are entirely different programs from Paint.NET. Paint.NET is a simple pixel art program, GIMP and Photoshop are professional applications for photo editing.

Photo editing != pixel painting.

Quote:

Ultimately, I think we come to the same conclusion: In the future, C++ will only serve the niche of "processing large datasets."

And any application where performance matters.

Quote:

What would you expect from crusty old nerds living in the past? The difference between them and the rest of us is that in 20 years time we won't be arguing why Java/C# is superior to the next big language/platform/paradigm.

Well, all arguments against C/C++ are moot, since Allegro is in C.

The day Allegro is in Java, we can talk.

Matthew Leverton
Supreme Loser
January 1999
avatar

I wish I could troll half as good as you! ;D Don't worry, I'm taking notes.

Paint.NET is a "simple pixel art program". And Allegro is an old DOS blitting library. Ignorance is bliss, they say.

Quote:

Paint.NET is free image and photo editing software for computers that run Windows. It features an intuitive and innovative user interface with support for layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. An active and growing online community provides friendly help, tutorials, and plugins.

It started development as an undergraduate college senior design project mentored by Microsoft, and is currently being maintained by some of the alumni that originally worked on it. Originally intended as a free replacement for the Microsoft Paint software that comes with Windows, it has grown into a powerful yet simple image and photo editor tool. It has been compared to other digital photo editing software packages such as Adobe® Photoshop®, Corel® Paint Shop Pro®, Microsoft Photo Editor, and The GIMP.

axilmar
Member #1,204
April 2001

Quote:

I wish I could troll half as good as you! ;D Don't worry, I'm taking notes.

Paint.NET is a "simple pixel art program". And Allegro is an old DOS blitting library. Ignorance is bliss, they say.

I am not trolling.

Does it match Photoshop and the GIMP? Is it used professionally? Has it replaced Photoshop yet? are its tools equal to Photoshop? can Paint.NET handle the same amount of data that Photoshop does with the same performance?

Did you check my code examples? do you have any objection on how Java handles generics and arrays? don't you recognize that these language constructs can potentially harm performance? Don't you see that C++ has the advantage over Java?

You have to check the details before simply declaring someone trolling.

Matthew Leverton
Supreme Loser
January 1999
avatar

Paint.NET handles the same amount and types of data just fine. It's photo editing software. Have you ever used it? It has unlimited undos, layers, filters, plugins, etc. No, it doesn't have all the features that Photoshop has, but the language is not preventing anybody from writing those features.

It doesn't have those features because it hasn't been around as long and doesn't have as many people working on it as Photoshop—nor is it trying to be an exact replacement for The Gimp (which is already free). It has nothing to do with limitations of C#.

Quote:

can Paint.NET handle the same amount of data that Photoshop does with the same performance?

When I use Paint.NET to edit my photos, I don't ever sit there and think "boy, I wish this were faster." It's sufficiently fast for the task at hand, and that's all that matters. If maximum speed were the goal of every project, then we'd all be writing in hand optimized machine code.

count
Member #5,401
January 2005

Quote:

Does it match Photoshop and the GIMP? Is it used professionally? Has it replaced Photoshop yet? are its tools equal to Photoshop? can Paint.NET handle the same amount of data that Photoshop does with the same performance?

Gimp isn't fulfilling most of your fators as well.
It didn't replace photoshop. It's tools aren't equal to photoshops. It isn't used professionally.

Why is the Gimp a major app an paint.net not?

axilmar
Member #1,204
April 2001

Quote:

Paint.NET handles the same amount and types of data just fine. It's photo editing software. Have you ever used it? It has unlimited undos, layers, filters, plugins, etc.

Yes, many times. I like it, for simple graphics editing is very good.

Quote:

No, it doesn't have all the features that Photoshop has, but the language is not preventing anybody from writing those features.

It doesn't have those features because it hasn't been around as long and doesn't have as many people working on it as Photoshop—nor is it trying to be an exact replacement for The Gimp (which is already free). It has nothing to do with limitations of C#.

Does it have the same performance with Photoshop in the features used by Publishing Studios?

Quote:

When I use Paint.NET to edit my photos, I don't ever sit there and think "boy, I wish this were faster." It's sufficiently fast for the task at hand, and that's all that matters. If maximum speed were the goal of every project, then we'd all be writing in hand optimized machine code.

But the point of this discussion is not if a program or a programming language is sufficient for small tasks.

I have said, right from the start, that C++ is used in big heavy software.

C# and Java are fine for smaller tasks.

C# may also be capable of matching C++ in heavy tasks like databases, for example.

Java certainly is not, due to the way it handles collections and arrays.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Why is the Gimp a major app an paint.net not?

Because it's written in C/C++ and on The List. ;)

Just like Allegro is somehow major! (Quote: "Well, all arguments against C/C++ are moot, since Allegro is in C.")

Neil Black
Member #7,867
October 2006
avatar

Quote:

I have said, right from the start, that C++ is used in big heavy software.

All right, so what is "big, heavy software"? Give us a concrete definition. Is there a minimum of CPU usage? A certain number of hard drive accesses? A required number of lines of code? What are the criteria for something to be "big, heavy software"?

Matthew Leverton
Supreme Loser
January 1999
avatar

count
Member #5,401
January 2005

What I observed in this discussion was:
the claim was made that all major apps are written in c.
Everytime a major c#/java app was mentioned the definition of a major app was changed excluding all non c++ apps.

I also think that c++ has a speed advantage.
But that doesn't mean it's the only option.

And the other advantages other languages have will lead to the fact that they will get used despite their speed problem. With better hardware speed becomes more unimportant from day to day.
Ease of development, bug tracking, changeability will become more valuable. C++ can't keep up in this categories.

I use C# for any private gui development.
And the only reason I use C++ for developing games is that there are no native librarys I like yet (maybe this will change in the future).
There is XNA as well. But I don't like it that much.

At work I develop software with Java.

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Everytime a major c#/java app was mentioned the definition of a major app was changed excluding all non c++ apps.

Precisely. But it doesn't matter. If he wants to think that all major apps are written in C++, that's fine. It's his definition, he can make it whatever he wants. His major apps list is so small, it's essentially the same thing I'm saying.

SiegeLord
Member #7,827
October 2006
avatar

Quote:

And the other advantages other languages have will lead to the fact that they will get used despite their speed problem. With better hardware speed becomes more unimportant from day to day.
Ease of development, bug tracking, changeability will become more valuable. C++ can't keep up in this categories.

Not in the scientific field, they won't. It is a mistake to think that ease of development, bug tracking and changeability necessarily come with speed penalties. E.g. ever heard of 'Vala' language? The idea is silly even to me, but basically it is C# that is translated to C and then compiled. So, they get all of the benefits of C#'s syntaxical sugar, with all of the benefits of C. I don't think Vala overall is that great, but it's an example of what axilmar wants (and what I want too): an easy to use language that does not sacrifice any execution speed.

I don't really know the history behind C# or Java, but I am 100% sure that if C# or Java were somehow compiled to machine code, all you fans of those languages would still like them, because you as coders only care about RAD and related buzzwords. You have come to accept the speed penalties as a necessary evil, because by chance the heavily marketed C# and Java had those speed penalties.

Well, I don't see that it is a necessary evil in general (it is if you use those languages). Vala is an example of that. D is an example of that. Neither of those two are perfect, but they are steps in the right direction.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Tobias Dammers
Member #2,604
August 2002
avatar

Quote:

The idea is silly even to me, but basically it is C# that is translated to C and then compiled.

C# is a compiled language; the only difference against a traditional one-pass compiled language like C++ is that the first pass (C# to IL) happens at build time, and the second pass (IL to machine code) at run time.
One JIT compiled, there is no reason equivalent chunks of code in C# and C++ can't perform equally well. The speed difference often observed doesn't necessarily come from the language itself, but rather because C# makes using safe, comfy (and thus slower) memory management easier than C++ does. When speed matters, a C# programmer can still allocate behind the GC's back and take care of pointers manually.

Quote:

C# and Java are fine for smaller tasks.

In my experience it is exactly the other way around: out-of-the-box C# (and probably Java too, don't use it enough to know for sure) is way superior in terms of organizing large projects, especially when using Visual Studio. The larger a project, the less comfortable I feel doing it in C++.

---
Me make music: Triofobie
---
"We need Tobias and his awesome trombone, too." - Johan Halmén

BAF
Member #2,981
December 2002
avatar

Quote:

All right, so what is "big, heavy software"? Give us a concrete definition. Is there a minimum of CPU usage? A certain number of hard drive accesses? A required number of lines of code? What are the criteria for something to be "big, heavy software"?

He has already defined that all heavy software uses C++. So obviously, any C++ application is a heavy application.

Quote:

C# is a compiled language; the only difference against a traditional one-pass compiled language like C++ is that the first pass (C# to IL) happens at build time, and the second pass (IL to machine code) at run time.

Actually, the latest version of Mono lets you go all the way to machine code at compilation time. It then outputs machine language code for the app and all dependencies.

count
Member #5,401
January 2005

Quote:

Not in the scientific field, they won't.

Noone ever disagreed with that.
axilmar said that no major app will ever be written in a diffrent language then c++. That was the point I couldn't agree with.

Quote:

but it's an example of what axilmar wants (and what I want too): an easy to use language that does not sacrifice any execution speed.

We want that too. We would be stupid if we wouldn't.
But as long as there isn't such a language, developers (doing non scientific apps) will start to use easy to use languages despite the (mostly unnoticable) speed penalty.
And the discussion wasn't about whether we want such a new language but about how only c++ is able to write major apps.

axilmar
Member #1,204
April 2001

I did not change the definition of a major app from the beginning of my post. I am sorry if I was not clear enough. Let me try again.

I consider the following apps big and major:

1) databases that are able to support a big number of transactions per second. Db2, Oracle, etc.

2) office software that can handle very complex documents with minimum delay. Microsoft Office, Open Office etc.

3) Web browsers that allow for many tabs (20, 30 tabs etc) to be open without much memory overhead. Internet Explorer, Firefox, Safari, Chrome.

4) Torrent applications that can manage thousands of peers per second. uTorrent, for example.

5) Desktop environments like KDE or Gnome.

6) Complex algorithms like Map-Reduce.

7) photoediting software like Photoshop that can handle big pictures (10,20,30 megapixels) with ease, with multiple effects and layers.

I have nothing against Java or C#. But the truth is that any application with object complex relationships and complex algorithms and big data sets will have lower performance than if programmed with C/C++.

I did not see anyone argue on the coding examples I gave. Why?

As for Allegro, I wonder why it is written in C. Why not in C#, for example? Or Java? since these languages are very fast?

And why there are no 'big' games in these languages?

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

As for Allegro, I wonder why it is written in C. Why not in C#, for example? Or Java? since these languages are very fast?

Why isn't it written in C++? Mainly Because the Allegro developers write in C. Every C library is written in C. Every ASM library is written in ASM. Every QBASIC library is written in QBASIC. Weird.

Regarding Allegro, C is the common denominator. It's cross platform and can be used within other languages. There are bindings to all sorts of languages, including C#!

If you want a native C# gaming library, get out the XNA.

Quote:

I did not see anyone argue on the coding examples I gave. Why?

Why should we? You gave a detailed list of major software.

#4 -> Vuze, a bittorrent client. Written in Java.
#7 -> Paint.NET, a photo editing client. Written in C#.

I say both of those have no substantial performance decrease. That's the end result of these languages that you say cannot perform well. Yet, there are two examples of complete applications that do.

So why should I break down the little details when I already know I won't agree with the end result? The proof of the pudding is in the eating...

weapon_S
Member #7,859
October 2006
avatar

Ugh, why do you go on? (:-X Why do I read?)
You can all agree the languages you mention do different stuff. I had a revelation a year ago or so. I was talking to somebody and the discussion somehow came to doing your own programming. He mentioned he used Javascript. WTF ?! Javascript ?!Yes. And he told me about all the projects he had in javascript and it was really interesting. He even did profiling and optimized functions (the proper mathematical kind founded optimization). And I thought: "Yeah, if it works for him, why not?" Up until that point I blamed myself for not learning assembly. I'm happy with C++. (Everyone seems to be harsh on C++. Give it some slack: it works terrifhack.) I overly enjoy optimizing at the level of C++. Some people like to do it on assembly level. Whilst others like to get as much functionality as possible, without considering the load they put on a system.
You can't argue over what people will like doing in the future. But what is needed for future business: being (overly) efficient or getting things fast? Both of-course. What tool will be used? Who knows?::)
Mr. Leverton if you really want to get the last word, abuse your power. Something like:

axilmar said:

Ooh, Matthew you're always right!

Only then without the quote tags...

BTW in the LHC they use custom built circuitry to do the first pass of data analysis. How's that for lightweight efficiency?

emilb
Member #7,146
April 2006
avatar

keep it up, I've come so far and I don't want to go to bed yet. This isn't over.

Steve++
Member #1,816
January 2002

I remember heated discussions like this over 10 years ago, except it was ASM vs C, C vs C++ or even reinvent the wheel vs using libraries (yes, there were people that believed real programmers don't use libraries!). Now it's C++ vs Java/C#. The arguments are always the same. Why doesn't axilmar go all the way and favour asm over C++? After all, if he's processing massive datasets, even one CPU cycle in an inner loop will make all the difference.

axilmar
Member #1,204
April 2001

Quote:

Why isn't it written in C++? Mainly Because the Allegro developers write in C. Every C library is written in C. Every ASM library is written in ASM. Every QBASIC library is written in QBASIC. Weird.

Well, if C# and Java are so fast, it could have been written in those languages. I don't see how extremely experienced programmers that can write C in their sleep have a problem with fancier and easier languages like Java and C#.

Or is it because they fear that their library won't be as fast as, let's say, in C?

Quote:

Regarding Allegro, C is the common denominator. It's cross platform and can be used within other languages. There are bindings to all sorts of languages, including C#!

Java is also cross platform.

Quote:

Why should we? You gave a detailed list of major software.

Because I am arguing about performance, which obviously you avoid.

Quote:

I say both of those have no substantial performance decrease. That's the end result of these languages that you say cannot perform well. Yet, there are two examples of complete applications that do.

So why should I break down the little details when I already know I won't agree with the end result? The proof of the pudding is in the eating...

Another take is this: why should you break down the little details when you know the real numbers will not support your arguments?

Quote:

axilmar said:
Ooh, Matthew you're always right!
Only then without the quote tags...

I never said anything like that.

Quote:

I remember heated discussions like this over 10 years ago, except it was ASM vs C, C vs C++ or even reinvent the wheel vs using libraries (yes, there were people that believed real programmers don't use libraries!).

I did not choose to heat the discussion up. I try to respond with facts and numbers, while Matthew acts like a politician: he tries to win not by arguments and facts, but with impressions.

Quote:

Now it's C++ vs Java/C#.

It is not. I never said C++ is better than Java or C#.

It's very strange. Everyone here thinks I said that C++ is better than Java or C#. I never said that. I said that C++ is better than Java or C# in performance.

Quote:

The arguments are always the same. Why doesn't axilmar go all the way and favour asm over C++? After all, if he's processing massive datasets, even one CPU cycle in an inner loop will make all the difference.

I have a friend that programs embedded devices and micro-controllers. He uses asm. If he says 'asm is better than C in this domain', should I tell him that he is wrong? he is obviously right.

Quote:

I don't see what the fuss is all about, and I really don't understand the reaction of the Allegro.cc crowd. You all support Matthew, perhaps because he is an American and I am not, or because he is the site owner. But your reaction is not logical. If you check the facts, the numbers, the performance, you will see that I am right.

count
Member #5,401
January 2005

You are right. It's not worth the fuss.

But I want to explain why we are arguing.

Quote:

If you check the facts, the numbers, the performance, you will see that I am right.

We never denied your numbers. And we never denied the c++ performance is better.
We just denied that not only C++ is able to write major apps.
That was because you definition of major app was/is different from our definition.

When we said you definition of major apps changed over time you said that was not the case.
That means: You meant the same all the time but because you said it differently we understood it differently in every post.
At first you definition of a major app seemed be to be the same as ours.
And with that definition your statement that only c++ can be used was wrong in our opinion.

Quote:

I said that C++ is better than Java or C# in performance.

And all we said that c++ will be used less in the future because for most projects this difference in performance will be unimportant.
Then you started to say that c++ will not be used less because it is the only tool to write major apps in.
But apps that are major apps after your definition are needed less then other shabby gui/server apps which c#/java be more then sufficient for.

So I don't see the point that you are arguing against the fact that c++ will be used less.

Quote:

Because I am arguing about performance, which obviously you avoid.

As said above we never wanted to argue about performance because we know this fact.
It isn't arguable.
The only thing we argued about was the fact that c++ will be used less and isn't the only language todays apps can be written in.

Quote:

Quote:

It's cross platform and can be used within other languages. There are bindings to all sorts of languages, including C#!

Java is also cross platform.

You missed the important part: can be used within other languages

Written in C means it can be used from: C, C++, Java, C#, Ruby... other ones.

So if you want a library that can be used in much languages you choose c.
Which doesn't mean that it is the ONLY language you can write a library in.

We probably tatalkedbout different things all the time whwhichas why we couldn't get to an agreement.
I hope you can see that now too. Let's all be friends again :)

What I can't ignore though:

Quote:

perhaps because he is an American and I am not

I don't know where you come from and I don't care. This is the internetz!
Saying something like that is a defamation. I would appreciate if you won't say something like this again.

Speedo
Member #9,783
May 2008

Quote:

As for Allegro, I wonder why it is written in C. Why not in C#, for example? Or Java? since these languages are very fast?

Because Allegro is old. It's origins are what, in 1990 or so? Java and C# didn't exist.



Go to: