Forums » Off-Topic

C++ and C#

May 20, 2007 moldyman link
Well:

1) C++ versus C#. Advantages and disadvantages. What would you use each for (because every programming language has a use, even as a paperweight use of it's manual).

2) Portability of C#. I know it uses .NET and can use .MONO, which is available to most platforms out there (The big three of nix, OSX, and windows anyway). What would I have to do differently and keep in mind when coding for .MONO?

Any help at all to either or both questions would be helpful.
May 20, 2007 avirulence link
If you program in C++ you can write cross-platform programs just as easy, or perhaps almost as easy as in C#.

I tried C#, thought it was pretty easy to learn. Still I think that I'd go for C++, but I'm nowhere near a programmer, so better wait for someone's expert opinion.
May 20, 2007 upper case link
for portability, go for c++. give mono a while before it matures to bet your next project on that.

on the other hand, if you're looking for a real object-oriented language, c++ is not it. it's an object-oriented syntax but once it's compiled (and dont give me this rtti crap), it's just plain and dumb c code.

c# is much better for oop. but if you're looking for oop and portability, go java. c# is basically a rehash of java plus a couple of language features rolled in, that brings it up to par with objective-c.

there are objective-c compilers & runtimes for windows and linux but i've not had much exposure to them so i wont comment on that.
May 21, 2007 roguelazer link
The ObjC stuff for Linux, at least, is just GCC's Objective C, which is the same compiler as Apple (probably the largest "user" of ObjC) uses.

Otherwise, I'd agree with pretty much everything uc said. Although there are so few cases where "real" oop, it really doesn't matter...
May 21, 2007 upper case link
yes rogue. apple's objective-c compiler is actually gnu's compiler. apple, wich owns the specs for the language, rolls their changes back into the general gnu distribution. when leopard ships, apple should level gnu's distribution with objective-c 2.0.

as for "real oop", i could go on forever as to why this is important but i'll summarize in saying that it has served me in more than one occasions to do things i couldn't have done otherwise. class/instance introspection & morphing really rules.
May 21, 2007 Cunjo link
May 21, 2007 moldyman link
o_o
May 22, 2007 moldyman link
Well, then, my next question is where do I find the libraries/classes/etc index. I mean the API, like Sun has for Java.
May 22, 2007 upper case link
what platform?

on mac os x, everything you need for c, c++, objective c (including objective c++) and java is free and available for download at apple developer connection (free online accounts available). the xcode development environement (ide), interface builder application, debug, profiling tools and online documentation are all part of the ~930meg xcode 2.4.1 package.

on linux, use your favorite package manager and get all the c, cpp, obj-c/obj-cpp & java tools & libs you'll ever need. ask someone knowledgeable on linux for directions (such as roguelazer).

for windows, just, just die. i dont know. ask leberwac. :p
May 23, 2007 Cunjo link
for windows, there's always Maplesoft Maple10... does everything.

Or jfgi and download the latest open-source or freeware compiler for the language of your choice.
May 24, 2007 moldyman link
I tend to trust the opinion's of VO playing programmers more than Google, especially since they explain stuff.

Anyway, I meant something like XCode (for you Mac users), in which it was possible to build the application bundle. Gonna try MS Visual C#
May 24, 2007 toshiro link
MS Visual C# is very good from what I hear from my colleagues. Especially a friend of mine who works in the software development industry praised it highly as the best app on Windows for this purpose.

YMMV.
May 24, 2007 moldyman link
Thanks tosh.
May 24, 2007 upper case link
visual studio is what the win developers use at the office. it's very good (for windows development of course) by all accounts.

for strict java development, oracle also gives away, for free, jdeveloper. it seemed to be ok but i've had only limited exposure to it. i'm an xcode guy.

disclaimer: i work for oracle, but i'm not a user of jdeveloper so i'm rather impartial.
May 24, 2007 roguelazer link
I prefer Eclipse or NetBeans if I'm going to use a Java IDE. Although vim > *
May 25, 2007 moldyman link
BlueJ is pretty nice as a student.