Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (532)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3]
  ignore  |  Print  
  Java vs. C#  (Read 8198 times)
0 Members and 1 Guest are viewing this topic.
Offline sproingie

JGO Kernel


Medals: 201



« Reply #60 - Posted 2011-09-29 23:32:41 »

import com.something.longwinded.Util as LWUtil;
import com.someothercompany.library.Util as SOUtil;

again, a trivial syntactic change that'd make my code look lovelier here and there.

Cas Smiley

Quoth Scala:

import com.something.longwinded.{Util => LWUtil}
import com.someothercompany.library.{Util => SOUtil}

Come to the dark side.  We have cookies.   Grin
Offline Roquen
« Reply #61 - Posted 2011-09-30 08:00:21 »

D & G tee shirt.
Online cylab

JGO Ninja


Medals: 38



« Reply #62 - Posted 2011-09-30 10:27:30 »

Come to the dark side.  We have cookies.   Grin

Scala is - erm - intresting (friendly spoken). It's like an escalation of strange characters. Also I can't see why someone with a right mind want to have syntax like this:

Quote
If an import is renamed to _, that symbol will not be imported. This allows importing everything except a specified symbol:
1  
import java.util.{Date=>_,_}

WTF?

1  
    var y:Int = _       //default initial value

WTF^2

1  
2  
3  
4  
5  
    x match {  //assume n is of type Number
       case Foo(a,b) if a==b => //here only when Foo with a==b
       case Foo(a,b) => //here for all other Foo
       case _ => //here for all non-Foo
   }

WTF^3

Scala seems to be like the JVM version of Perl... Kotlin seems much nicer to me. But since I never really used both, just reading some docs, both might be equally good or bad.


Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nsigma
« Reply #63 - Posted 2011-09-30 11:29:37 »

Come to the dark side.  We have cookies.   Grin

Well, that's hardly a surprise, Scala's got everythingTongue

Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Offline JL235

JGO Coder


Medals: 10



« Reply #64 - Posted 2011-09-30 14:54:47 »

Come to the dark side.  We have cookies.   Grin

Scala is - erm - intresting (friendly spoken). It's like an escalation of strange characters. Also I can't see why someone with a right mind want to have syntax like this:

Quote
If an import is renamed to _, that symbol will not be imported. This allows importing everything except a specified symbol:
1  
import java.util.{Date=>_,_}

WTF?

1  
    var y:Int = _       //default initial value

WTF^2

1  
2  
3  
4  
5  
    x match {  //assume n is of type Number
       case Foo(a,b) if a==b => //here only when Foo with a==b
       case Foo(a,b) => //here for all other Foo
       case _ => //here for all non-Foo
   }

WTF^3

Scala seems to be like the JVM version of Perl... Kotlin seems much nicer to me. But since I never really used both, just reading some docs, both might be equally good or bad.
It makes sense to me, but then I've used several functional languages, which has influenced a lot of Scala.

This is why one thing I'll give credit to Java, is that after a short while of difficulty, it is a relatively easy programming language to learn. If you compare it to languages which are normally more pretty, like Ruby, it's trivial to write expressions which are a nightmare to break apart. Due to how verbose it is, it's usually quite difficult to write complex expressions in Java, which makes most individual snippets of code quite simple to understand.

Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #65 - Posted 2011-09-30 15:44:03 »

That is precisely Java's strength. Unfortunately the more stuff that goes in to it, the more the way it works is hidden and the harder it is to grasp what is actually going to happen.

Cas Smiley

Offline Roquen
« Reply #66 - Posted 2011-09-30 16:55:00 »

Yes I was refering to this paper. The use of labels, "break" and "continue" is forbidden in some kinds of programs, especially in safe softwares (softwares critical for human beings, used in airplanes, during operations in hospitals, etc...).

Because some constructs are undesirable for a given contract usage doesn't mean they are poor constructs, which is what you said.  Specially: "These things are not a part of structured programming".

Quote
Programs written without these things are easier to prove, they are closer to their mathematical equivalents, I can easily find the entry and the exit of the methods.

Maybe my lambda calculus is a little rusty (OK..It's almost rusted away), but I don't believe that this is generally true.  I assume you're familiar with Coq and related tools.

That is precisely Java's strength. Unfortunately the more stuff that goes in to it, the more the way it works is hidden and the harder it is to grasp what is actually going to happen.

You thinking of anything specific?  It seems to me that all the added language features have been reasonable additions without making it any harder.

WRT: Scala.  I want to like scala.  I've tried to like scala.  But I never succeeded it figuring out how to do anything I wanted to do.  (I'm not a functional n00b).  Specifically I wanted to do a hierarchy of mathematical types with associated pattern-transformation rules and could never figure out if I could and if so what the syntax was.  But the last time I tried was at least a couple of years ago.
Offline sproingie

JGO Kernel


Medals: 201



« Reply #67 - Posted 2011-09-30 17:40:39 »

"val x = _" is a wart.  Vals are immutable, so they have to be initialized if they're not in a position to be abstract.  Me, I'd prefer anyone using a val initializes it with an explicit value.  As for the rest, that was really basic syntax.  There are some examples of seriously hairy noisy syntax -- check out just about anything in scalaz for example.  I just happen to like languages that are actually capable of expressing such complexity within less than a thousand lines of code each.

(edit: none of my further comments are constructive, so deleted.  language wars are ridiculous)



Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #68 - Posted 2011-09-30 21:07:56 »

You thinking of anything specific?  It seems to me that all the added language features have been reasonable additions without making it any harder.
Generics didn't help as much as they could have done - I still sometimes end up baffled when I start to encounter "? super Blah" etc. The shorthand type inference <> thingy they're introducing in Coin should help matters a bit. Generics is probably my only real complaint syntactically. This closure stuff looks as if it's going to make some code pretty hard to figure out. Inner classes are at least an easy concept to grok because nearly all the workings are laid out in front of you in source code in a manner which makes sense based on what you already know about how Java works. Autoboxing is a little cringeworthy, and just papers over Java's inability to use primitives in generics.

Cas Smiley

Offline drakesword

Junior Member


Medals: 1



« Reply #69 - Posted 2011-10-04 11:48:55 »

Personally I prefer Java:

I don't have much experiences with c# so the following are educated guesses at most. If I am wrong its because how c# has been represented to me.

Yes you can develop for free but actually selling a product takes more effort on c#
Point Java

Yes you can use C# on linux but some things don't work and some things only half work
Point Java

Yes you can do robotics with both but I have encountered more java then c#
Point slightly java

Mobile development More java done then c#
Point java

Web based applications
Point Java


Some side notes. In the end we may want to sell something. You could do it under the table but what happens when you want to expand get bigger. Sure you could risk it but eventually you will need licensing. On top of that more games are being developed being cross-platform Java already does this so there's no need to recompile or hack in different libraries.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ReBirth
« Reply #70 - Posted 2011-10-04 13:17:52 »

Yes you can use C# on linux but some things don't work and some things only half work
Point Java
actually Java has that problem too, it's just not too big.

Offline OverKill

Junior Member




Java games rock!


« Reply #71 - Posted 2011-10-04 15:47:26 »

Come to the dark side.  We have cookies.   Grin

Well, that's hardly a surprise, Scala's got everythingTongue
And in some cases, that is not a good thing!
Offline JL235

JGO Coder


Medals: 10



« Reply #72 - Posted 2011-10-04 18:44:53 »

I post a lot of negative stuff on Java, but I still think it's excellent. However I just don't think C# is a bad as some people here claim, and I really don't like all the half truths posted about how bad it is. The reality is that this is a discussion between two languages, which are both well made, with very active ecosystems and very mature!

Yes you can develop for free but actually selling a product takes more effort on c#
Point Java
Simply not true.

If your selling a product yourself, then the difference is mute, but I'd argue C# is easier. This is because Microsoft have put working into building re-distributable copies of .NET and XNA, specifically for use with installers, making the process of distributing .NET with your application much easier. Re-distributing Java with your application is not difficult, but you have to do it yourself.

Further Windows 8 is getting a Windows store, with distribution integrated into Visual Studio. This will allow you to sell C# projects much easier. C# also has the XNA Community Developers channel (or whatever it's called), which allows you to sell your XNA games on the 360. It's not massively popular, but some people have made a decent amount of cash.

In comparison Java briefly had the Java Store, which was truly terrible, and was cancelled ages ago. The Windows 8 store also allows you to sell existing applications, which would including those built using Java.

So C# wins this hands down, because Java has nothing to help you.

Yes you can use C# on linux but some things don't work and some things only half work
Point Java
If you are using threads, OpenGL, Swing, Java2D or anything involving audio, then you can easily encounter cross-platform issues with Java. It's far better then C#, but far from perfect.

If you target difference devices, then you do need to be platform specific. Different screen sizes, input configurations, and other factors make this a reality in any language, including Java. For example lots of Android apps work badly on Android tablets, simply because they just weren't designed for a larger interface.

Yes you can do robotics with both but I have encountered more java then c#
Point slightly java
Microsoft have their own Robotics Developer Studio, where as with Java it's mostly a collection of various third party tools and libraries. As a result, you have to hack a lot of the bits together yourself. I have some experience using Java with simple robotics, and the fact is that most of these libraries are very hit and miss. Some work, whilst others tragically fail.

Lego Mindstorms, one of the best robotics kits for learning, works with both Java and C#. However it's also supported with the Microsoft Robotics Developer Studio.

Diversity, I'd say Java wins, but for maturity, I'd say C#.

Mobile development More java done then c#
Point java
Half true.

Old mobiles use J2ME, which uses Java 1.3 for the language, and their old APIs. It is also heavily dated, and only popular in emerging economies (namely China, India and Latin America). Android uses it's own VM, which has a mix of standard and non-standard libraries.

But the most important mobile platform is iOS, since it has the biggest ecosystem, and over 90% of all mobile applications are sold on iOS. Here C# has products such as Mono Touch and Unity, which allows you to build C# games/applications for both Android and iOS, using Mono. iOS development using Java is mostly non-existent (there are some proof of concepts floating around online).

For very old phones, Java wins hands down. For Android, Java wins, but C# is pretty good too. For iOS, which is the one that matters, C# wins.

Web based applications
Point Java
The JRE is far more popular then Silverlight. However Applets are partially blocked in Chrome, and Mozilla might be following suit. Both Java and Silverlight are fully blocked in Metro, but you can easily port Silverlight apps to Metro.

However Applets are universally worse then Flash, Silverlight or HTML5/JavaScript, due to the terrible startup times, lack of modern UI's, endless certificates for anything sophisticated, and a bad model for handling incorrect versions and plugin updates.

For converting to HTML/JS, there is GWT for Java, which is outstanding. But there is also Script# for Silverlight, which is used heavily within Microsoft (I believe Hotmail is built using it), and so it's also pretty mature. There are other alternatives for C#, such as JSC (but I'd go with GWT or Script#).

So if your using a plugin, Java is more popular, whilst Silverlight gives a far superior experience, but neither are the best (I'd recommend Flash of HTML5/JS). For converting to HTML5/JS, Java wins simply because GWT has more use/examples/libraries/ecosystem, but C# is still an excellent choice.

Offline drakesword

Junior Member


Medals: 1



« Reply #73 - Posted 2011-10-04 19:20:00 »

Once again, all of this is from my point of view. It is not saying everyone has the same experience.


Further Windows 8 is getting a Windows store, with distribution integrated into Visual Studio. This will allow you to sell C# projects much easier. C# also has the XNA Community Developers channel (or whatever it's called), which allows you to sell your XNA games on the 360. It's not massively popular, but some people have made a decent amount of cash.

Like I said from my experience. XNA requires license which costs money when you want to distribute. I believe the Microsoft store will be the same. On the same lines microsoft store does not target multiple platforms just windows 8. In the targeting a single platform you have the android marketplace. I can understand people have made money on both but when it comes to just dipping your feet in then java wins due to lack of fees.

If you are using threads, OpenGL, Swing, Java2D or anything involving audio, then you can easily encounter cross-platform issues with Java. It's far better then C#, but far from perfect.

If you target difference devices, then you do need to be platform specific. Different screen sizes, input configurations, and other factors make this a reality in any language, including Java. For example lots of Android apps work badly on Android tablets, simply because they just weren't designed for a larger interface.
I have not encountered a problem with Java other then having the proper libraries which also happens in windows.

The different device targeting issues are problems with any language.

Also if you were to use an installer for a java application the necessary libraries can be loaded on the system. If you wern't worried about size then you could even pack a VM in with your application and run it from the install directory.

Microsoft have their own Robotics Developer Studio, where as with Java it's mostly a collection of various third party tools and libraries. As a result, you have to hack a lot of the bits together yourself. I have some experience using Java with simple robotics, and the fact is that most of these libraries are very hit and miss. Some work, whilst others tragically fail.

Lego Mindstorms, one of the best robotics kits for learning, works with both Java and C#. However it's also supported with the Microsoft Robotics Developer Studio.

Diversity, I'd say Java wins, but for maturity, I'd say C#.

Again from my experience. Javas hit and miss is due to third party development. You are comparing a broad set to a specified set. Like comparing Schwinn to all automobiles.

Also from my perspective. I use Java because my robot run environments are mostly linux based.

Also the collection of various tools and libraries is once again due to people developing for different platforms. Not all robots are the same, not all platforms are the same, not all objectives are the same. If you are using a broad range of open source libraries you will encounter this in any language in any standpoint. That is the fun behind hacking code. Take a graphics library from a video game, database setup from a enterprise application, communications stack from another application. No they are not going to fit you have to make it either by tape or hammer.

Half true.

Old mobiles use J2ME, which uses Java 1.3 for the language, and their old APIs. It is also heavily dated, and only popular in emerging economies (namely China, India and Latin America). Android uses it's own VM, which has a mix of standard and non-standard libraries.

But the most important mobile platform is iOS, since it has the biggest ecosystem, and over 90% of all mobile applications are sold on iOS. Here C# has products such as Mono Touch and Unity, which allows you to build C# games/applications for both Android and iOS, using Mono. iOS development using Java is mostly non-existent (there are some proof of concepts floating around online).

For very old phones, Java wins hands down. For Android, Java wins, but C# is pretty good too. For iOS, which is the one that matters, C# wins.

Yes iOS has a large portion of the market but android has a more diverse base. Android apps wont run on iOS and iOS wont run on Android but as far as the number of different devices Android is better. Android is on the rise and with jobbs retiring I believe that apple will soon to be on the fall.

Jumping back into the other side of the problem. Doesn't it cost money to develop applications for iOS or at least royalties?


The JRE is far more popular then Silverlight. However Applets are partially blocked in Chrome, and Mozilla might be following suit. Both Java and Silverlight are fully blocked in Metro, but you can easily port Silverlight apps to Metro.

Due to exploits. Someone will find some for silverlight soon.

However Applets are universally worse then Flash, Silverlight or HTML5/JavaScript, due to the terrible startup times, lack of modern UI's, endless certificates for anything sophisticated, and a bad model for handling incorrect versions and plugin updates.

Agreed, but don't forget that Applets are but a part of web development.

For converting to HTML/JS, there is GWT for Java, which is outstanding. But there is also Script# for Silverlight, which is used heavily within Microsoft (I believe Hotmail is built using it), and so it's also pretty mature. There are other alternatives for C#, such as JSC (but I'd go with GWT or Script#).

So if your using a plugin, Java is more popular, whilst Silverlight gives a far superior experience, but neither are the best (I'd recommend Flash of HTML5/JS). For converting to HTML5/JS, Java wins simply because GWT has more use/examples/libraries/ecosystem, but C# is still an excellent choice.

As a side question, has anyone had any good luck with silverlight and linux? I have not even tried.

Now theres another part of web development that you missed ... server side technologies! Apache has Tomcat which is a JSP server. So you end up mixing elements of java and html together. While I agree that Applets are dated and have issues (Its an older technology) C# still has a lot of ground to make up.

Now we can compare Java and Flash all day but we are trying to focus on Java and C#.

Once again all of this is from my view.
Offline Spasi
« Reply #74 - Posted 2011-10-04 20:39:41 »

Some interesting Kotlin samples: DSLs in Kotlin: Part 1. Operator overloading and infix method calls look nice.
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #75 - Posted 2011-10-04 20:55:03 »

From my POV iOS just took a big back seat since I discovered Android devices are now up-to-speed enough and the market for such devices is going to eclipse iOS devices in the very near future. I'll get around to iOS one of these days but... meh. With Java I don't have to change my PC (wtf!), my IDE, my language, the 10 years of library code I've developed, the tools and toolchain to go along with those libraries, my XML, or even my ancient wisdom. Suddenly Android is full of win for the likes of me.

Cas Smiley

Offline sproingie

JGO Kernel


Medals: 201



« Reply #76 - Posted 2011-10-04 20:59:23 »

Kotlin still strikes me as Scala Lite, and a solution looking for a problem.  And if anyone's saying it's a good thing that there's less complexity than Scala, then I have to wonder what they're going to think about Kotlin which has such things as *gasp* operator overloading.  Except it still has the crippled sense of identifiers, so you just have to remember that an overloaded '+' maps to a method named 'plus' (and I guess you're screwed if you had a 'plus' method before), whereas in scala, it's simply named '+'.

The language I'm going to be excited to see get some legs, assuming that ever happens, is Shen.  Right now it's so obscure as to be ungooglable, but it's the successor to the lisp/prolog hybrid Qi language, but it aims for a lot of other backends, including Javascript.
Offline pitbuller
« Reply #77 - Posted 2011-10-04 21:04:55 »

From my POV iOS just took a big back seat since I discovered Android devices are now up-to-speed enough and the market for such devices is going to eclipse iOS devices in the very near future. I'll get around to iOS one of these days but... meh. With Java I don't have to change my PC (wtf!), my IDE, my language, the 10 years of library code I've developed, the tools and toolchain to go along with those libraries, my XML, or even my ancient wisdom. Suddenly Android is full of win for the likes of me.

Cas Smiley

Way to go. Market share predictions pretty much say same thing. Android powered decives just sell five times as much iOs ones. Two years and android market beats app store and this do not even include  money from ads that grow even faster.
Offline princec

JGO Kernel


Medals: 342
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #78 - Posted 2011-10-04 21:07:25 »

Got to remember though that 90% of those Android devices are cheapass rubbish. It's the growth of the top 10% that's important - the Galaxy S IIs and Sony Experias and such - that need to eclipse iOS. And I think they are. Interestingly Android tablets are going nowhere fast compared to iPad but the Amazon Fire may assist.

Cas Smiley

Offline JL235

JGO Coder


Medals: 10



« Reply #79 - Posted 2011-10-05 18:09:28 »

The JRE is far more popular then Silverlight. However Applets are partially blocked in Chrome, and Mozilla might be following suit. Both Java and Silverlight are fully blocked in Metro, but you can easily port Silverlight apps to Metro.

Due to exploits. Someone will find some for silverlight soon.
They did, and Firefox even blocked Silverlight, but only for a couple of days because Microsoft got it fixed pretty quickly.

Pages: 1 2 [3]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (16 views)
2014-07-24 01:59:36

Riven (16 views)
2014-07-23 21:16:32

Riven (14 views)
2014-07-23 21:07:15

Riven (16 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (40 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (36 views)
2014-07-16 23:30:00

Cero (51 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!