Earlier quoted context omitted.
Omitting dots and parens is superficial; it's no more a Perlism than allowing whitespace or extra parens (which almost all languages do). Could you give an example of what you consider a more consistent JVM language? I find Scala is often more consistent, because it uses a small number of powerful features. E.g. Kotlin doesn't have Scala's implicits - so it instead has a bunch of different special-case features (e.g.…
I disagree about the dots and parents. It impacts readability because the person reading the code, which most developers do 90% to 95%. If different developers on the team use different styles, it makes reasoning about the cod that much more difficult. I can't say I've followed Kotlin all that closely, but it struck me as a less dense language. Ceylon is a language I've followed closely, and I find it very consistent…
Under the Hood with Java 10 Enhanced Generics
31–40 of 45 posts
Re: Under the Hood with Java 10 Enhanced Generics
#32Earlier quoted context omitted.
Meh? B&D languages bother me, for the most part--your criticisms would apply to C++, which I'm also happy to use. I mean, omitting dots and parens is primarily of value in flexible DSLs. Otherwise? Talk like adults and figure out the idioms you wish you adopt. Does one of your developers do something that you don't like. Then y'all talk it out. Not hard. Consistency is important, but effectiveness is, by my lights, m…
"Talking it out" isn't an option when you're dealing with code that's older than last week, let alone code written by developers that you've never met - you can't talk it out retroactively. That's a huge part of the 'which effective subset' argument against C++ and Scala. The argument is that, in the long term, 'simplicity and consistency', even if clunky at times, are way more effective than 'expressiveness'.
Omitting dots and parens is so superficial that you could change the code purely mechanically to your preferred style. Just like running an autoformatter on someone's code before reading it because you don't like their indentation style.
Re: Under the Hood with Java 10 Enhanced Generics
#33Earlier quoted context omitted.
Heh. I guess with the IDE's there is quite a bit of personal taste involved but believe me I am not the only who prefers IntelliJ. Wrt. the other things; the way I see it .NET-support outside Windows has been "vapourware" since .NET's inception. It simply has not happened. In the beginning I thought this was MS's deliberate strategy but now the tables have turned and as a sinister business strategy it does not make s…
Cross-platform and performant? Wait six months. (My friends in a position to know say sooner, but I'm a pessimist.)
Re: Under the Hood with Java 10 Enhanced Generics
#34Earlier quoted context omitted.
I disagree about the dots and parents. It impacts readability because the person reading the code, which most developers do 90% to 95%. If different developers on the team use different styles, it makes reasoning about the cod that much more difficult. I can't say I've followed Kotlin all that closely, but it struck me as a less dense language. Ceylon is a language I've followed closely, and I find it very consistent…
Ceylon is very nice, and probably is more consistent; first-class union types are a really good idea. Its Java interop story isn't quite as good as Scala's (without existential types, you can't express many Java generic methods - and try calling a Java generic method with a Ceylon tuple), and I don't think I could live without higher-kinded types and some equivalent to for/yield (do notation). But it does feel pretty…
Re: Under the Hood with Java 10 Enhanced Generics
#35Earlier quoted context omitted.
There are a lot of problems with reification. It's a real strait-jacket. It would kill the JVM as a platform for Clojure and Ruby and kill some of the advanced parts of Scala.
Interesting! Could you expand on that or direct me to some good links on the subject?
Unfortunately I did not understand the specific reasons he gave, but it had to do something with reification.
Re: Under the Hood with Java 10 Enhanced Generics
#36Earlier quoted context omitted.
I like C#, I write a lot of it, but the claims of complexity regarding Scala are just so vastly overblown. Anyone who's a competent Java programmer and has an open mind (which is the nicest way I can think of to say "doesn't pee themselves when they see a lambda") can be a competent Scala programmer within a month of daily use. It's not that hard, the tooling today in IDEA is roughly Java-level in terms of quality, a…
Let me preface this by saying I've been a full time Scala dev for a few years now, and routinely make the choice to use Scala in new projects. That said, the complaints about Scala's complexity are not overblown in the least. If you ever had the opportunity to move from one Scala team to another, or to integrate 2 Scala teams that had grown independently previously, you see that even saying you are a Scala team does…
I only worked in a small team so far (3 devs) and had a good experience introducing Scala, but I can imagine that with people who have previous Scala experience and "their own style" can be problematic.
Re: Under the Hood with Java 10 Enhanced Generics
#37Earlier quoted context omitted.
Cross-platform and performant? Wait six months. (My friends in a position to know say sooner, but I'm a pessimist.)
Ok. I have been waiting since 2002 so what is another 6 months? :-)
don't need to wait much longer; it's already faster than nodejs for trivial benchmarks and getting better every day.
Re: Under the Hood with Java 10 Enhanced Generics
#38Earlier quoted context omitted.
My experience is much more like the one described by the_af . IntelliJ is OK for most Scala code, but it regularly makes a mess of anything complicated. So much so that, in our office, the first answer to "why doesn't this code compile" is "Does it really not compile, or is IntelliJ being dumb again?" It's usually the latter. I think it depends on what style of Scala you use. Anything involving slick or spray tends t…
Huh, I use Slick quite a lot and never have trouble. Never used Spray. I guess I don't write terribly complex stuff (I really do use Scala largely as I'd use a JVM C#, I suppose) in general, though. About all I find myself using refactoring tools with for Java is renaming, honestly, so I guess I'm more likely to have my itches scratched by the current state of tooling. Thanks for the explanation, though!
Re: Under the Hood with Java 10 Enhanced Generics
#39Earlier quoted context omitted.
I like Scala (and I'm starting to use it in my day job!) but I don't really think IDEA tooling is "roughly Java-level" quality. In fact, all the Scala IDEs I've tried are astonishingly bad, IntelliJ included. The consensus among the more knowledgeable Scala programmers at my office is that IntelliJ is too quirky as an IDE (probably due to its built-in Scala compiler which gives way too many faux compile errors. This…
I won't touch IntelliJ, but I find Eclipse good enough to work with. I've seen the syntax-errors-in-random-files bug occasionally; it's always been a block of text "moved" to the wrong place in the file. Annoying and worrying, but pretty quick to fix. Debugging has always been reliable though, and simpler refactoring works, and it's getting better at a good rate. But yeah, the problems are real.
Re: Under the Hood with Java 10 Enhanced Generics
#40If you can't wait until 2018, it's worth pointing out that Scala has production-quality implementations of these features on the JVM already, usable today. There are plenty of nontrivial limitations (that will cause a traditional boxed codepath instead), but the core features are working.
Scala isn't the only alternative JVM language that has a superior generics implementation and that doesn't have primitives. What neither Scala nor those languages have is support for value types (structs) at the JVM level. Generics over primitives and value types is a natural consequence of the introduction of value types to the JVM.