Results 1 to 8 of 8
Thread: Jave + C#
- 05-04-2011, 02:45 AM #1
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
Jave + C#
I see a lot of people recommend C++ along with Java in terms of learning. I was curious what peoples thoughts regarding C# were. It seems to be in high demand for a lot of things but I like the portability of Java.
My background is primarily with scripting languages (Perl, Python, Shell scripting on UNIX). I'm trying to learn more about OO languages just for fun and am currently teaching myself Java. I'd like to be thorough and learn the concepts of multiple languages.
Is C# a good place to look or should I go the C++ route? Any advice etc would be very welcome.
- 05-04-2011, 02:48 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Why not learn both? You may find things about c++ you prefer and the same with c#. I have almost no c# experience but I am learning c++ and java atm. Either language will help you understand oo, i believe c# is similar to java in that it is a purely oop language.
-
If you're doing this just to learn, you can choose what you like. The concepts learned by studying C# are directly extensible to Java and visa versa. C++ is a different animal entirely, and would be worth learning, but not at the same time as the other two languages. In other words, I'd choose one language and learn it first.
- 05-04-2011, 03:30 AM #4
Member
- Join Date
- Jan 2011
- Posts
- 67
- Rep Power
- 0
IMO if you are interested in learning C++ and Java/C# I strongly recommend learning C++ first, you'll understand a lot more about programming principles and how computers actually work with C++ than the other 2. It'll also be MUCH MUCH MUCH easier going to another language from C++ than the other way around as languages like Java/C# will teach you EXTREMELY bad habits for C++ that will render any C++ app a failure and unusable where as the bad stuff for Java/C# learned going the other way are usually quite minor. You'll get frustrated that a lot of the useful things you can do in C++ can't be done in Java though (not sure about C#) but going the other way you'll probably also get frustrated as Java comes with a lot of libraries with commonly used classes/functions that you'd need to write yourself in C++.
TBH while personally I'd always prefer C++ over Java/C# you need to consider if it's worth you learning C++. If you intend to write complex games, real time simulations, applications that directly interact with special hardware, applications for devices with limited hardware specifications or applications that need complex time critical calculations, then C++ is almost always the best language and worth learning. If however you wish to write business applications, simple games, hobby apps, ect. then Java/C# are probably all you'll need and will make development of the apps a lot faster/easier.Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.
- 05-04-2011, 06:06 AM #5
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
I'd like to ask what things you think java teaches that will cause errors in c++?
I agree that java babies you a bit. I feel a lot of the things aren't normally allowed in java it's just that java makes there error much more visible than c++.
- 05-04-2011, 08:47 AM #6
Member
- Join Date
- Jan 2011
- Posts
- 67
- Rep Power
- 0
The main thing is that you won't be in the habit of managing memory, making sure you have the appropriate constructors and destructors, freeing everything you allocate, knowing where to free or allocate, buffer overruns, order of construction/destruction, ect. They won't cause errors but the apps will leak till they crash and given how often you need to allocate in Java that would probably happen rather quickly with the same frequency in C++ especially when factoring in memory fragmentation (another thing a Java programmer is less likely to know about).
These are things that you need to get in the habit of doing or need to be constantly aware of in C++, otherwise development will be very slow and there will be many bugs. IMO it'd be a lot harder to form these habits and keep C++ specific things in mind if you start in Java/C# where it's not necessary. But going from C++ to Java/C# it's pretty easy to just not do those things, you will get tripped up here and there with some Java things too (like 2 objects referencing each other preventing garbage collection) but you'll easily understand why with a C++ background and a maybe quick explanation.
Yeah, one of the problems a lot of people have with C++ is that it lets you do a lot of stuff that under most circumstances you really shouldn't and can cause serious problems, but that's also one of it's biggest advantages as you can really save a lot of memory and CPU time when you know what you are doing and use those techniques right. However a lot of it just isn't possible in Java (AFAIK) like unions, reinterpreting casts, unsigned data types, passing objects by value and stack variables, which means they are less likely to be learned and understood or used properly by someone coming to C++ from Java.Currently developing Cave Dwellers, a Dwarf Fortress/Minecraft style game for Android.
- 05-04-2011, 08:50 AM #7
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
Good explanation, thanks for that, I'm only just getting into memory management in c++ so that didn't come to mind.
- 05-04-2011, 02:58 PM #8
Member
- Join Date
- May 2011
- Posts
- 7
- Rep Power
- 0
Similar Threads
-
jave script where is source code
By maryjane in forum New To JavaReplies: 1Last Post: 01-15-2011, 02:48 AM -
Need Help For Jave Slideshow
By defanci in forum New To JavaReplies: 0Last Post: 01-06-2011, 07:15 AM -
Jave Developers (job Opportunity)
By tetfernandez in forum Jobs OfferedReplies: 1Last Post: 01-15-2009, 12:25 PM -
For User: I have Jave 6, Update 7; Do I need to keep Older JRE?
By bizadi in forum New To JavaReplies: 13Last Post: 07-31-2008, 05:35 AM -
Database connectivity in Jave struts with Hibernate
By sanjay_sharma77 in forum Advanced JavaReplies: 1Last Post: 02-02-2008, 08:41 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks