Jump to content

  • Log In with Google      Sign In   
  • Create Account


From java to c#


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 burnt_casadilla   Members   -  Reputation: 423

Like
0Likes
Like

Posted 31 July 2012 - 07:03 PM

I know I've made a few topics already but I've been reading up on different languages and I'm considering switching from learning java to learning c#.
Ive made a simple text based rpg battle simulator in java so I know the basics quite well I think, but I want to get into mobile development first and eventually move to c++.
What would be the pros and cons of switching to c#? I know it's possible to port c# to android using different libraries but is it really worth relearning a new language?

If you see a post from me, you can safely assume its C# and XNA :)


Sponsor:

#2 Cornstalks   Crossbones+   -  Reputation: 6966

Like
0Likes
Like

Posted 31 July 2012 - 07:11 PM

You're a programmer. You'll learn several languages over the course of your career. Just get used to learning more languages.

If you want to learn a language for academic reasons (that is, just for the sake of learning more), that's great. Go ahead and learn it.

If you don't want to learn a language for academic reasons, and you have no real reason for learning a new language, why bother?
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#3 burnt_casadilla   Members   -  Reputation: 423

Like
1Likes
Like

Posted 31 July 2012 - 07:14 PM

I figured it would be easier to switch from c# to c++ than from java to c++

If you see a post from me, you can safely assume its C# and XNA :)


#4 Cornstalks   Crossbones+   -  Reputation: 6966

Like
1Likes
Like

Posted 31 July 2012 - 07:19 PM

I figured it would be easier to switch from c# to c++ than from java to c++

Yeah, you might want to forget that thought. Just because "C#" and "C++" both begin with the letter 'C' doesn't mean they are like each other at all. They are very, very different. The only real common ground between C#, Java, and C++ is some of the syntax (they all use curly braces, they write for loops in similar ways, etc). C# is just about as different from C++ as Java is, overall. If you want to learn C++, just go ahead and jump in. There's no need to learn a "transitioning" language because, quite honestly, there is none.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#5 burnt_casadilla   Members   -  Reputation: 423

Like
0Likes
Like

Posted 31 July 2012 - 07:29 PM

Thanks that's the answer I was looking for. Eventually I will move to c++ but I guess I'll stick to java since I already have the hang of it

If you see a post from me, you can safely assume its C# and XNA :)


#6 vleugel   Members   -  Reputation: 252

Like
2Likes
Like

Posted 31 July 2012 - 11:19 PM

It totally depends on what you want to achieve.
I think it always pays to learn a new language, it might come usefull at some point in time and it's actually not that hard to use c# if you have already learned the basics of java.

However, I don't realy see the point of using C# for android applications. I could be wrong, but isn't the official SKD written for java? Why not just using java if you want to write appliations for android. C# is mostly written for windows applications, just use java for android and c# when you want to write applications for windows, it's not like you are only allowed to use one language for all your projects. My advise: stick to one language (java?) first and try to get experienced with it. Than learn some additional languages like c# and c++ as it will broaden the possibilities
.

Greetings,
Rob

#7 jbadams   Senior Staff   -  Reputation: 17272

Like
0Likes
Like

Posted 01 August 2012 - 01:22 AM

If you're interested in trying Android development, I'd suggest sticking with Java for now, as unless you're using some third-party tool that also uses C# it'll be much easier than targeting Android with C#. As mentioned above, the official Android SDK is Java-based.


Otherwise, the languages are pretty similar, and you can use whichever you're comfortable with.

#8 smr   Members   -  Reputation: 1556

Like
1Likes
Like

Posted 01 August 2012 - 03:29 PM

There are some efforts to develop a .NET runtime for Android, but the reality is that there is very little reason to bother with it. Java and C# are so similar that any minor benefit you get with the arguably nicer C# would be overshadowed by the burden of trying to work with a non-google supported platform.

The only good reason as I see it to use C# on Android would be to reuse a large amount of C# code that porting would not be possible or cost effective. In reality I don't see this ever actually happening because any code base large enough to not be candidate for porting probably wouldn't be well supported by the Android C# runtime anyway.

#9 burnt_casadilla   Members   -  Reputation: 423

Like
0Likes
Like

Posted 03 August 2012 - 02:43 PM

I've decided to make a game on windows and once it's done and almost perfect I'll try to port it to android

If you see a post from me, you can safely assume its C# and XNA :)


#10 6677   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 03 August 2012 - 02:57 PM

You can always use java for your windows application aswell.


FYI, android apps can also be developed in C++ when you get to that point, windows phone 8 can aswell and I have no idea about iphone.
C# with monodroid (costs $400 per year) or monotouch (also $400 per year) can run on android and iPhone but I don't think thats a price worth paying.

Your probably best of sticking where you are with java on desktop OSes and android.

#11 Shippou   Members   -  Reputation: 1355

Like
0Likes
Like

Posted 03 August 2012 - 05:58 PM

The syntax of C# and C++ are quite a bit different.

I jumped from Java into C# quite some time ago, and was surprised was how similar the languages are, though in C# I had to get use to the fact *everything* is an object.

If you want to learn C++ jump right in and learn it. It will be challenging .... err "fun" at first, but it does not require learning other languages to master.

 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 


#12 M6dEEp   Members   -  Reputation: 888

Like
2Likes
Like

Posted 03 August 2012 - 10:07 PM

I jumped from Java into C# quite some time ago, and was surprised was how similar the languages are, though in C# I had to get use to the fact *everything* is an object.


Everything is an object in Java and as a matter I would say that your claim is backwards. In C# you have c-style structs which Java does not have. Also I would have to say (from experience) that doing C# and then going to C++ is a better route. Yes the two languages are very different, but they have many overlapping concepts and features. Pointers can be used in both languages, and you can invoke C++ code from C# applications using p-invoke (which is also MUCH easier to use than JNI by the way). The biggest thing to get a handle of when you move from C++ to C# is pointers, how memory is managed, scope and understanding the compilation process. I'm sure there are people who disagree with that, but those were the biggest gaps in my knowledge when crossing over.

Of course this is just my opinion, and I have to say that it's more important to just do what you feel is best and learn from your mistakes. Software development in general can become quite religious and sometimes for most people it boils down to what is trending instead of what may be optimal for what you want to do.

#13 abcdef44   Banned   -  Reputation: 2

Like
-4Likes
Like

Posted 04 August 2012 - 02:18 AM

90% is written in C++. Hence why bother at all about other languages? I've learned once a little VB.net in technical school, but honestly I've never used it since. It was only some kind of help for learning C++.

Edited by mike4, 04 August 2012 - 02:20 AM.


#14 6677   Members   -  Reputation: 1058

Like
2Likes
Like

Posted 04 August 2012 - 04:35 AM

90% of what is written in C++. if that was 90% of everything that claim is VERY false. This very webpage your looking at has a large amount of javascript elements on it. Google use python on their servers as do other websites. Linux is written in C and has some python and perl I think on the higher level code. Windows I think originally was written in C, I think the current versions are C++ though.

Many games on use C++ for the engine itself and other languages for scripting.

#15 abcdef44   Banned   -  Reputation: 2

Like
-4Likes
Like

Posted 04 August 2012 - 10:21 AM

Webpages are not programming languages, but script languages, apart maybe 0.001% Java.

#16 Cornstalks   Crossbones+   -  Reputation: 6966

Like
2Likes
Like

Posted 04 August 2012 - 10:46 AM

90% is written in C++. Hence why bother at all about other languages?

Because you're claim is wrong. People bother with other languages because 90% of code is not necessarily written in C++. Maybe 90% of the code you work with is C++, but there's another 7 billion people on this planet who may (and many of them do) use something else. Projects I've worked on at work/related to work have used: Ruby, Java, C++, C, and C#. If you want a job as a software developer (in the real world, not working as a code monkey), you should learn and be comfortable in several languages. Sure, you may truly master only one or two, but the mindset "I only need C++" is only going to hold you back. For example, one job offer here on GameDev.net asks for a C# programmer. Your C++ knowledge won't be good enough. And then there's the rest of the CS industry, which positions use a wide variety of languages.

Webpages are not programming languages, but script languages, apart maybe 0.001% Java.

Scripting languages are programming languages (yeah, there's some debate about where you draw the line between scripting language and programming language, but in the current context they can be considered the same). And Java is used in more than 0.001% for web servers and sites. Now markup languages (HTML) aren't programming languages, but 6677 wasn't referring to markup languages.

Anyway, I'm not going to derail this any more. This isn't really relavent to the OP's question, so I suggest someone creates a new thread if they want to further this tangential discussion.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#17 azonicrider   Members   -  Reputation: 421

Like
0Likes
Like

Posted 05 August 2012 - 04:24 AM

I believe its good to know multiple languages, but then you use one language as your "weapon of choice", that you'll use for game dev, projects, software etc., and will have the most knowledge on.

Easiest way to make games, I love LÖVE && My dev blog/project

 

*Too lazy to renew domain, ignore above links





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS