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:
WTF?
var y:Int = _ //default initial value
WTF^2
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.
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.
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”.
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.
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.
“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)
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.
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.
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!
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.
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.
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#.
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.
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.
Once again, all of this is from my point of view. It is not saying everyone has the same experience.
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.
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.
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.
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?
Due to exploits. Someone will find some for silverlight soon.
Agreed, but don’t forget that Applets are but a part of web development.
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#.
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.
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.
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.
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.