5 ms·
I haven't yet replaced Python, but I really enjoyed Dart using JetBrains' WebStorm IDE for a side project. Python maps really well to a lot of the problems tha
by Programmatic 10y ago
I haven't yet replaced Python, but I really enjoyed Dart using JetBrains' WebStorm IDE for a side project.
Python maps really well to a lot of the problems that I'm tackling right now professionally, but I'm considering trying to use Java for a number of them. C# may wind up being viable for me as well; it has a chance of being a little more cross-platform with Xamarin's purchase by MS and overtures toward OSS and Linux by integrating Ubuntu.
- lmm 10y agoI used to be a huge Python fan until I found Scala. It can be as expressive as Python (slightly more so even), but as safe as Java (again, slightly more so).
- willtim 10y agoUnfortunately Java is far from safe, NullPointerException and ClassCastException abound. Which isn't surprising given that Java was originally inspired by ObjectiveC, a mostly dynamic language. Scala has a sort of ML subset which mostly avoids these errors, but unless you need the JVM, why not try OCaml or Haskell?
- jdmichal 10y agoDefault-nullable types and thereby having to check for null in every non-primitive argument is definitely a thing in Java, but I don't think I've seen a ClassCastException in the wild for a very long time... Generics pretty much solved the problems that led to bad casts, such as a integer sneaking into your list of strings.
- willtim 10y agoYes true, Generics helped a lot (thanks to Odersky and Wadler). But the language does seem to encourage more dynamic frameworks like Spring, that IIRC do perform a lot of casting.
- lmm 10y agoThere are some Java libraries based on reflection, sure, including Spring. They're not widely used from Scala.
- nradov 10y agoNullPointerException can usually be prevented by using FindBugs annotations. This is a work around for a fundamental design flaw in the Java language, but I find it's pretty effective. http://findbugs.sourceforge.net/manual/annotations.html http://findbugs.sourceforge.net/manual/annotations.html
- lmm 10y agoI agree that those are good languages - my reasons for using Scala rather than OCaml or Haskell are mostly boring practical ones (interop with Java, employment, tooling). That said I do think higher-kinded types are very valuable (which rules out OCaml until they finish the modular implicits feature), and that eager evaluation is very useful if there's a chance performance might become important at some point.