Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agree. I'm always amazed by people who say "Kotlin is great because it doesn't try to do more than fix a few warts of Java!", ... did these people ever leave their Java bubble?

The world is moving on at a frightening speed when it comes to language design currently, largely thanks to Idris. The idea that some people think "hey, let's pick this language from 1995 and change it slightly" is going to cut it ... that's just mind-boggling.



I find it completely reasonable, and the right course of action.

All those new ideas in language design, are exactly that: new and unproven (like the Hindley-Milner type system, which, while quite old already, has not been proven to be a major strength, and it is certainly complicated, esp. its undecipherable error messages).

"Languages from 1995" (I don't know why you picked that specific year; some very successful languages are much, much older) have been used to build really good software, while "new" languages (Heskell, 1990; OCaml, 1996; Scala, 2003) have not proven to completely change software quality in a way just justifies their arguably less intuitive (if only culturally) designs.

Where are all the bug-free Haskell operating systems, drivers and embedded controllers? Where are the OCaml scalable severs? Where are all the Scala complex enterprise apps? I'm not saying there isn't any really good software written in those languages, but not nearly enough to prove a significant qualitative advantage.

On the other hand, when Java came out in 1995, it took maybe 5 years for pretty much the entire software world to adopt it, and it wasn't just marketing: its advantages were palpable and immediately apparent. I think (though I'm not sure), that C and later C++'s adoption was about as fast. If 25 year old languages like Haskell, and even 10 year-old languages like Scala, haven't shown such an immediate and enthusiastic widespread adoption, maybe their advantages aren't that extreme. Instead of those languages' designers sitting mind-boggled, maybe they should think long and hard about what it is that they're solving exactly and how important it really is.

I think the problems tackled by more "modern" languages are either not important enough, or their solution is far from optimal. For example, it is quite possible that a good type system could help produce good software faster (though it isn't certain either), but that this type system is Hindley-Milner seems unlikely at this point. Pluggable type systems (like the ones recently introduced to that 1995 language, and, I believe, also supported by Kotlin) might actually be a better way to go forward. I also think that some more important advances in programming languages have come not from PL researchers, but from developers (Java, Erlang, Clojure).


> If 25 year old languages like Haskell, and even 10 year-old languages like Scala, haven't shown such an immediate and enthusiastic widespread adoption, maybe their advantages aren't that extreme.

Haskell advantages are so extreme they elude most.

What were Java first 5 years advantages ? Wasn't it all 'Java is client-side silver bullet' ?

ps: by Pluggable Types did you mean Type Annotation http://openjdk.java.net/projects/type-annotations/‎ or just the Checker Framework ? http://types.cs.washington.edu/jsr308/‎


Type annotations are the frontend to the pluggable type systems provided by Checker (but they were added to Java 8 in order to support Checker):

http://docs.oracle.com/javase/tutorial/java/annotations/type...

EDIT: I think Java's initial advantages were taking good C++ concepts, simplifying them, and running in a safe environment (GC memory, app can't just crash etc.).


That amounts to Guy Steele quote about moving halfway to Lisp. Haskell is on that same road, just way further.


The funny thing about your comment is that you could have made the exact comment in 1995 to dismiss Java. Sometimes it just takes very long for ideas to reach mainstream, but they can nevertheless become extremely successful.

The most important innovation in the Hindley-Milner type system was parametric polymorphism, since that is the thing that enables you to build more powerful abstractions. Since the release of Java 1.5 and C# 2.0 that is now fully mainstream, but it took more than 25 years.


Oh, I have nothing against new ideas in programming languages, and I think the more "researchy" programming languages are invaluable to the community in the insights they provide on what works and what doesn't. I was simply responding to the befuddlement that the industry prefers languages that adapt ideas slowly, rather than those that are cutting-edge.


> when Java came out in 1995, it took maybe 5 years for pretty much the entire software world to adopt it, and it wasn't just marketing: its advantages were palpable and immediately apparent. If 25 year old languages like Haskell, and even 10 year-old languages like Scala, haven't shown such an immediate and enthusiastic widespread adoption, maybe their advantages aren't that extreme.

Any number of companies are still using C++, which itself took decades to reach the level of popularity that it did; Java is the exception rather than the rule in that regard. (And if we're just comparing popularity, I don't know how it is in your corner of the industry, but Scala growth has been massive over the last few years where I've been looking - and that's not based on Sun's marketing millions, but on word of mouth from people who're using it and finding that it helps them write better programs)


I don't think I would call Scala's adoption "massive", but for the sake of this discussion, let's say I agree. Now, Scala has many features; which of them, do you think, are the largest contributors to that adoption? Hindley-Milner? Implicits? Type-safe macros?

I'd argue that it's lambdas, traits (both now in Java 8), and reduced boilerplate for Java beans; also, maybe pattern matching. Now, all of those features are in Kotlin, which has a far simpler (though less expressive, even though that hasn't been proven to be a major problem) type system and much, much smoother integration with Java.


Tuples, Pattern matching, Structural types, Implicits, Collections framework etc. etc.

One of the biggest advantages of Scala is the community. Java has a culture of excessive over-engineering, boilerplate and XML. The Scala community tends to think more in terms of a fresh start, rather than seeing themselves as a Java extension. The extreme resistance to change within the Java community and unwillingness to look beyond the only tool in their toolbox makes are also major issues. Every feature is unnecessary complexity and evil until it gets added to Java, and then suddenly the "evil" feature in C# or Scala is suddenly an amazing new "innovation".


> Now, Scala has many features; which of them, do you think, are the largest contributors to that adoption?

Low-boilerplate syntax is certainly a big plus, but I think the biggest feature of scala is that it makes it easier to handle cross-cutting concerns without stepping out of the language. Concretely: a consistent, natural syntax for async calls; better ways of handling errors (validation monad), dependency injection without reflection. And almost as important is the ability to construct DSLs in the language itself (e.g. spray's routing syntax); I know at least one company where this was the primary rationale for adopting scala.

So I think higher-kinded types are a key feature, even if to start with users are only using the libraries built on top of them (you can do specific bodges like C#'s async/await without them, but to have a consistent, extensible syntax that does collections, async calls, and error handling you really need the higher level of abstraction), as are implicits and dependent types (both vital for DSLs). And there were certainly times when I found myself wishing for macros before they existed. Some users might come for the syntax or the traits (though I think error-handling and good async abstractions are at least as appealing, particularly in finance where a lot of the adoption is happening), but you stay for the type system.


Scala doesn't use HM. To one way of thinking, this is a demerit.


Right. Sorry. Its type system is actually more complicated than HM, and suffers the same problem of undecipherable error messages.


>I'd argue that it's lambdas, traits (both now in Java 8), and reduced boilerplate for Java beans

Those are the reasons people get in to scala from Java, but not the reason they stay.

Implicit conversion/parameters, higher kinds, and monadic comprehension are the reasons people stay in Scala.


> Hindley-Milner?

If you spent a few minutes actually using Scala instead of trying to bash and hate it in every thread, you'd know that Scala doesn't use HM.

Scala killer feature is the assurance that developers can express the things they want, unlike Java and C# where the compiler starts acting like an angry child as soon as I want to do anything slightly more elaborate.

That won't be changing anytime soon.

> a far simpler (though less expressive, even though that hasn't been proven to be a major problem) type system

The lack of typeclasses is a non-major problem? I would say it is an absolute dealbreaker.

Anyway, in what sense it is "far simpler"? Most of the complexity comes from dealing with Java's broken ideas. If Kotlin wants interop, it can't ignore that.


> Scala killer feature is the assurance that developers can express the things they want

If you mean "some developers" or alternatively "some of the things they want" (this set of things being strictly greater than the set of things available in Java), I'll agree with you.


He picked 1995 because of, obviously, Java. He was talking about Java :)


A sure sign that somebody has run out of arguments is bringing up "popularity" in language design topics.


A cynic would say that the world keeps moving on at a frightening speed towards rediscovering lessons from languages from 1960s.


Nothing cynical in it, it's just how things are.

We're spinning in circles with frightening speed indeed, it's the linear speed we're lacking...


I think it's more people are excited about Kotlin because it gives you some of the best parts of Scala without the long tail of confusing stuff. Sure, it's not revolutionary, but if the base level for everyone is ratcheted up a notch or two, it makes the next move even easier.


It feels like a trial version of Scala with some of the juiciest features missing until you upgrade.


Well, it's not all about the language. For me, and others, who are aware and have dwelved in advanced languages (such as Scala, Haskell, Lisp family), Java is often our choice for even hobby projects. It's not that we cannot see other languages's benefits. It's that in our opinion it's the best choice all things considered (how efficiently one can write readable/refactorable code being one of the most important things).

Kotlin seems to be one very good alternative in the future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: