C++ vs C#

DemoCoder said:
Yes, I would agree that C++ lacks readability. Operator overloading only compounds that. That's why I like Eiffel. Design by contract increases readability even further.

Sounds good. I'll check it out.
 
Re: Languages

Scott_Arm said:
What would be a good programming language to learn in terms of up and coming languages that may gain wide use? Maybe try to get a headstart on something, or at least get in early.

For the up and coming part: Delphi (and Turbo/Borland Pascal before it), is twenty years old and there are millions of programmers worldwide who use it daily. So you would have to look at something else if you wanted something new. That might be it's Linux twin: Kylix, if you think Linux will be the next big thing (what it very well might become).

8)
 
DemoCoder said:
You should like it. It's Pascal derived too like Delphi. Think of it as Delphi on steroids.

Now you've done it: I have to come up with some kind of project to give it a try.
 
I think the only downside is Eiffel doesn't have as good an IDE as Delphi. One of the things that makes Delphi good is the IDE.
 
DemoCoder said:
I think the only downside is Eiffel doesn't have as good an IDE as Delphi. One of the things that makes Delphi good is the IDE.

I'm downloading it now. I'll give you some feedback when I have some experience. That will probably take a while.
 
--- Intermission ---
Interesting comments from Bjarn Stoustrup about C++ here.

PS: It goes without saying that it's a fake, but an entertainning one! 8)
--- and now, the usual program goes on...
 
Question

Ok, I used Pascal when I was in highschool, maybe 6 years ago, at a guess. I made a frogger clone, but the frog was a cute baby ... my teacher gave me a bad grade, citing inappropriate content ... anyway, from what I remember, which isn't much, Pascal was an entirely procedural language. I imagine that the syntax has changed quite durastically now that it is OO?

My real-time and embedded systems instructor is always preaching assembly and C(worst case). My compilers teacher was always preaching C. My data structures and algorithms teacher was always preaching C++. My C++/Software Requirements Analysis teacher was always preaching Java. And they all dumped all over .NET. I think .NET is a good idea in principle. I was looking into MFC, but it just looked nasty to program.

I think I'll look into Delphi and Eiffel
 
Ok ...

Remi said:
--- Intermission ---
Interesting comments from Bjarn Stoustrup about C++ here.

PS: It goes without saying that it's a fake, but an entertainning one! 8)
--- and now, the usual program goes on...


That was a good joke until I hit the porn banner at the bottom of the page and realised I was still at work ... Maybe that was the joke ... I dunno.
 
Re: Question

Scott_Arm said:
Ok, I used Pascal when I was in highschool, maybe 6 years ago, at a guess. I made a frogger clone, but the frog was a cute baby ... my teacher gave me a bad grade, citing inappropriate content ... anyway, from what I remember, which isn't much, Pascal was an entirely procedural language. I imagine that the syntax has changed quite durastically now that it is OO?

My real-time and embedded systems instructor is always preaching assembly and C(worst case). My compilers teacher was always preaching C. My data structures and algorithms teacher was always preaching C++. My C++/Software Requirements Analysis teacher was always preaching Java. And they all dumped all over .NET. I think .NET is a good idea in principle. I was looking into MFC, but it just looked nasty to program.

I think I'll look into Delphi and Eiffel

Most teachers preach in their own church. Don't listen to them for the big picture. If they could tell you about that, they would earn the big bucks themselves.

Programming is a Black Art. Knowing how to do it well will serve you well. And if you know how it should be done, you can talk with all your teachers. There is no real difference between programming in C++, assembler or Pascal. To a good programmer, it's just another language. Just take the best tool for the job. With Delphi, you cannot go wrong and Eiffel sounds really nice.

The .NET platform is different. The idea is good, but the execution is quite poorly. Any runtime you need to get your program to function will absorb a lot of time you could spend better by improving your program. After all, it's not your computer that has to run the program, but a lot of random computers of customers. Any additional component you need to make it happen will require lots of time and frustration. And .NET requires a lot of them.
 
Re: Ok ...

Scott_Arm said:
Remi said:
--- Intermission ---
Interesting comments from Bjarn Stoustrup about C++ here.

PS: It goes without saying that it's a fake, but an entertainning one! 8)
--- and now, the usual program goes on...


That was a good joke until I hit the porn banner at the bottom of the page and realised I was still at work ... Maybe that was the joke ... I dunno.

The story is a Classic for programmers.
 
Installing the .NET runtime doesn't absorb hardly any time from the developer, and it conveys vast productivity improvements. Moreover, it is likely to be built-into all future versions of Windows.
 
DemoCoder said:
Installing the .NET runtime doesn't absorb hardly any time from the developer, and it conveys vast productivity improvements. Moreover, it is likely to be built-into all future versions of Windows.

As I do systems management as well, it is like Access, JET, ADO, multi-language, MDAC and DAO: it almost never works when you need two programs running on the same computer that require different versions of any of them.

While the .NET redistributable itself does not need all of those, an Access database is easily used. And when you're not American or English, multi-langual is required. Not mentioning global settings of decimal separators. Those hurt. COM objects and ActiveX are very sensitive.

And anyway, how are you going to distribute all of that? Most distributors seem to think: "we include and force-install everything needed to run our application". So other applications break down, but hey, that's not our problem! It's the problem of the local systems manager. Meaning me.

That's why I hate applications that depend on specific versions of components, especially if you have to install, enable and distribute them all to innocent users.

Accounting programs, electronic banking, Access, VB and .NET programs are by far the worst of the bunch. If you can get them to run together on the same computer at all, it breaks down all the time. And then what do you do?
 
So. Why do you think the types of programs mentioned are so bad? I have a theory.

Accounting programs.
Well, this one is easy. There is absolutely no way in hell that you can convince the management to switch to another accounting program, no matter how poorly the current one is or how much the upgrade is going to cost. They think the chance they will go broke during the switch is too big. If you want to be a programmer and get large companies by the balls for free, write accounting software.

Electronic banking.
Banks are even worse. They not only have the companies by the balls, but by the throat as well. Although they are just a little bit more willing to invest in potential large customers. But the software they write is often exceptionally arrogant, sometimes even the internet versions.

Access.
Well, two reasons for this one: first, half the time it is written by a very proud employee, who will go any length to get his software used by all. The other half is mostly amateuristic and poor programs, although there are a few exceptions.

VB.
Some of it like the above, but more often hired programmers who are (relatively!) very cheap. You get a lot less than what you pay for, although the product might well meet all specs. Sometimes, enthousiasts. If it is a product from a large company, it (or it's management) is just arrogant or naive: we use all Microsoft, that has to be the best way to do it.

.NET
Well, mostly the enthousiasts and the arrogant and/or naive companies.

For the programmers, this is quite hard to see as a problem: of course everyone has to have the latest version of every service-pack, component and run-time installed! But not all of them are upward-compatible. So, in practice, this is more often than you think not an option.

Another problem is with very nationalistic companies, be they American, Brittain, French or German: if you write an Access program in a local version, it won't work with a version of Access that is for a different locale (although it isn't as totally impossible as it was anymore).

And of course, just using a comma as the decimal sign in a string is deadly in foreign countries. Or a dot, for a German program. Et cetera.

Anyway, what irritates me the most is, that if you call their helpdesk, they will tell you exactly what you have to do to get their program running. The moment you are not willing or able to change the whole network and all the workstations the way they see fit to get their program running, they hang up on you.

So, all the other nasty programs have to go to make the ones like above work, if needed. Unless a manager bought it, of course ;)
 
Enterprise applications do not need performance, especially real-time performance, as their primary attribute, they need correctness. By their very nature, they deal with people's money, personal information, and corporate resources, where a mistake is very expensive and where enterprises can afford to toss money at hardware.

Thus, the ideal enterprise environment is a language platform that

a) is verifiable, permits as few bugs as possible
b) scalable and modular, support very very large projects, with many many authors, in the assumption that not all source is shared
c) is readable by it's nature, because enterprise systems last a loooooong time, much longer than the programmer that wrote them
d) transaction safe. if a problem does occur, the ability to "roll back" to a known good state is very important

C++ is about the worst language to write business applications in . In fact, business languages do not even usually need a procedural or imperative language. Many of them can work just fine using a declarative language.


I think pure functional languages like Haskell (and to a lesser extent) OCaml, satisfy many of the above requirements, but they are not very readable IMHO, and while people laugh at languages that use "BEGIN/END" instead of "{, }" or even more verbosity, they won't be laughing when they look at 3 year old code, perhaps written by someone else.
 
So, to sum up, Delphi and Eiffel are good for writing business apps in, C++ is good for games and the like in, and .net languages are good for just that, the net.
 
I started my programming "career" with C. It was the main language at our faculty in University. But gosh I hated it. It feels like you spent most of the time doing something really trivial. I then picked up all the C++ courses from other faculties and found it little better. Next I went into Windows-programming course where we used Delphi. Before that I had always used notepad + commandline so it was really hard to let Delphi mess up with your code. But eventually I found the language quite good and the IDE excellent.

I had only briefly touched Java but my first job in software-business was to write some Java-programs. It was a really easy language to learn. Not sure what happened but after learning Object Pascal I figured that it really doesn't matter what programming language you use. They all are rather easy to learn but it's little harder to figure out what programming really is. I almost heard this clicking sound coming out of my brains one day. Well heh, hard to explain.

Still, first job was with Java. Not sure why but we found it painfull to write. Maybe because our IDEs were lacking or maybe because we mainly wrote Windows-applications. Now, after a year of transition period we are using .Net, Visual Studio and C#. If I said that Java was easy to learn I could say that there wasn't anything to learn in C#. Personally I think that the best part in C# + VS combination is that it feels like your actually doing something. It's productive. That combination is also my pick if I have to do programming at home.

So, summa summarum. I think that with C and C++ you end up spending most of your time doing something trivial. Java is easy-to-learn language but I wouldn't recommend it for Windows-programmers. Delphi is nice combination of good language and excellent IDE and it's hard to choose between this one and C# + Visual Studio, if you mainly do applications for Windows. But I still prefer the latter. I find the language itself easier to read and with the help of .Net, you aren't that restricted to WindowsForms-applications.
 
Back
Top