• 0

C++, C# or VB.net ?


Question

I've been developing apps for VB6 and various macros for VBA for years now and I feel that now is the time to move on and invest some time learning a new language, the question being... which one?

Is C# going to take over from C++ in the future as language of choice for employers? is it worth bothering with VB.net?

Which do you recommend is worth the time invested in it?

Link to comment
Share on other sites

Recommended Posts

  • 0
That's the hard part. Maybe it's not "much more" complicated, but it is more complicated. Just like VB.NET is more complicated than VB6. This original poster is coming from VB6 and VBA and said nothing about his OOP knowledge.

In my experience tutoring students in college, wrapping one's mind around pointers, raw data formats, contexts, etc. is, surprisingly, a very difficult task for many people once they've gotten set in the mindset of references, classes and string-as-a-data-type. OTOH, once you're familiar with C and the common constructs that you have to deal with (namely, the use of context pointers), C++ classes come very, very naturally because it's basically something that you've been doing all along in C but with a wee bit of syntactic sugar.

(On that note, I hate references; pointer may look uglier and may be potentially dangerous, but they are at least explicit; you know exactly what you are doing and it's that explicitness makes pointers far better than references, IMHO, and sadly, it seems that people who only know references find it hard to make that conceptual leap from references to pointers, whereas people familiar with pointers will see that references are just a (bad) case of syntactic sugar.)

Edited by kliu0x52
Link to comment
Share on other sites

  • 0
In my experience tutoring students in college, wrapping one's mind around pointers, raw data formats, contexts, etc. is, surprisingly, a very difficult task for many people once they've gotten set in the mindset of references, classes and string-as-a-data-type. OTOH, once you're familiar with C and the common constructs that you have to deal with (namely, the use of context pointers), C++ classes come very, very naturally because it's basically something that you've been doing all along in C but with a wee bit of syntactic sugar.

I'm not saying that it's not difficult to use pointers and everything that comes with learning a lower level language. My point is that there's a difference between creating classes and creating classes correctly. There's little doubt in my mind that beginners can create classes and manipulate objects that compile. However, if used/designed incorrectly, those same classes can lead to a horrible mess that just makes the system and language more complicated. I've seen it time and time again.

Link to comment
Share on other sites

  • 0

Once you start getting into more advanced C++ and templating, it most definitely becomes complicated to someone with only C experience. It takes a while to learn, and is not that obvious.

If you were to compare learning C from the ground up and C++ from the ground up, the latter is more complicated simply because it is a more substantial language with more to learn. You have to learn most of C (you do, really, because most OSes and libraries have C-based APIs) and all the C++ features.

Link to comment
Share on other sites

  • 0
You can use pointers and such in VB.NET (again, same base runtime), it's just not as "nice" as C#.

you can use IntPtr but you can't step outside of the boundaries of the managed runtime which is what unsafe code allows you to do, which isn't possible in vb.net

Link to comment
Share on other sites

  • 0
you can use IntPtr but you can't step outside of the boundaries of the managed runtime which is what unsafe code allows you to do, which isn't possible in vb.net

Sure you can, or PInvoke wouldn't work on VB. :) It does not, however, allow you to use pointers for iterating arrays. The Visual Basic extensions do it for you.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.