Live data from Hacker News

Java Developers

nsainsbury.svbtle.com

211–220 of 321 posts

Re: Java Developers

#211

> The OO craze has a part to play in this madness as well. More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit. Once real systems (like UI frameworks) are written with FP, we can compare apples to apples. Until then...wtf? OO actually works well for scaling complexity, much better than toy immutable functions do. > Even today you’ll still find a strong b…

+1 for the "toy immutable functions". Immutability everywhere is the current hype, but like mutability it has its advantages/disadvantages. The main consideration is the tradeof between performance(best for mutability) vs ease of use of development (best for immutability). However on HN, the war is dogmatic whereas reality is not that black and white. As a Java developer, I find immutable String and primitives very convenient. For the rest, the liberty left to the developer is sufficient for high performance applications.

Re: Java Developers

#212
I totally agree with the original poster. I picked up Java in the mid-90's for server-side dev. Grew to loathe it.

When Google announced an open-source OS for mobile - I was so happy. But ... Java. Broke my heart. Don't Google have any taste. At least Google could bless an alt-Java Swift-ish alternative like Kotlin, Xtend, AnythingButJava.

Re: Java Developers

#213

Earlier quoted context omitted.

I did the two FP courses from Mr. Odersky using Scala as the main language and then continued playing with the language for small experiments. While the language is awesome in general, I would not recommend it at work.

The secret of Scala is that it can be used in a wide variety of ways by a wide variety of teams. Yes, you can end up hiring people that would rather work in Haskell, or those that hate the type system and would rather code in Clojure. I've seen people that attempted to make Scala look like Java, or even Javascript. My current team, working in Scala, has had plenty of people like that. But the fact that you can get to…

I will steal that argument for D.

Re: Java Developers

#214
As a relatively young programmer, I feel that I'm just now exiting this stage of over-abstraction and pursuing a "perfect" design. Perhaps it does plague many older programmers, but to me super object oriented programming was a sort of programming puberty. In high school, I would sit down to write a Java program and figure that I would have to construct this grand architecture where each class reused absolutely no code and fit perfectly in an abstraction hierarchy. Of course, I would quickly lose focus of business logic and write a gazillion SomethingSomethingRepresentation classes and get nowhere. It really hit me when I realized I had a file named Null.java :)

Re: Java Developers

#215

Earlier quoted context omitted.

Any particular reason you wouldn't recommend it at work?

As the author of this post mentioned the culture of the Java developers, the "architect" thing and the frameworks, Scala has its own similar problems: it attracts a group of academics on type systems and creates over-engineering in a completely different direction. Also, while I think Scala is simple at its core concepts and syntax, it gets complex because it has too many features and tries to support all features pr…

> it gets complex because it has too many features and tries to support all features present in other programming languages

Which things do you have in mind?

> Why do you want structural typing there?

Isn't that a simplification? Instead of saying "here are types which you can use as e. g. parameter types, and here are types which you can't use (like in Java)", it says "all types work the same way".

Re: Java Developers

#216
post #110

Earlier quoted context omitted.

Scala isn't really functional, its more like a better Java that happens to include some FP abstractions (like C# does with Linq). Its actually a good OOP language, better than Java and even C#. Clojure is a Lisp, its niche. There will always be some people around who want to program in a Lisp, and many of them are just choosing Clojure today. Nothing new really.

It's unfair to call Scala 'not really functional'. Although I agree it allows for very rich OO programming, dismissing it as merely adopting "some FP abstractions" and comparing it to LINQ is bordering on FUD. To substantiate these claims, you have to at least give an example in which Scala falls short in being a functional programming language. Interestingly, Scala's combination of OO and FP has given it (besides a…

I agree on that.

Many things considered the domain of "functional" languages these days, like typeclasses and higher-kinded types are supported in Scala.

Saying that Scala is 'not really functional' is more or less denying OCaml, F#, SML (in fact, pretty much every language except Haskell, Idris, ...) the status of a functional language.

Re: Java Developers

#217

Earlier quoted context omitted.

ArrayIndexOutOfBoundsException ... extends IndexOutOfBoundsException extends RuntimeException extends Exception extends Throwable Not exactly an abomination, but I would not call it thing of beauty

Most words exist in fairly deep ontologies also, is English an abomination?

> is English an abomination?

Yes, yes it is. All natural languages are. They are living, breathing, evolving, organic concepts. They don't have the benefit of being designed and prescribed by an individual or group of individuals like programming languages do.

Re: Java Developers

#218

> The OO craze has a part to play in this madness as well. More and more developers are stepping back and realising that as a programming paradigm, OO is actually pretty shit. Once real systems (like UI frameworks) are written with FP, we can compare apples to apples. Until then...wtf? OO actually works well for scaling complexity, much better than toy immutable functions do. > Even today you’ll still find a strong b…

> OO actually works well for scaling complexity, much better than toy immutable functions do. Sure, but the problem is that OO is frequently applied where you don't need scalability, and then OO becomes the complexity that needs to be scaled. A low-hanging example of this is the singleton pattern, and the Wikipedia section titled "Example of use with the Abstract Factory pattern" saves me from having to bother making…

I totally agree if scalability also implies flexibility. I've seen too many cases where a developer will over-engineer something for flexibility when it is never, ever going to be necessary. For example, you will never, ever break a facade into a composite. I've seen a facade that is a wrapper for some external system engineered into a composite of Aggregators, Generators, Executors, etc. but the developer willfully ignored the fact that each of these pieces still have a dependency on the external systems/structures and are never likely to have separate implementations.

At the same time, I've seen OO used in the enterprise as a poor governance mechanism. For example, I've seen AAA unit test "frameworks" that included abstract methods solely to force developers to follow the pattern. But I just jumped right out of that shit by ignoring the instruction to "extend from AAAContextBase".

Re: Java Developers

#219

Earlier quoted context omitted.

How would you prefer to define UI layouts? Some other DSL? A binary format?

Another DSL. Structural DSL like this: form { input { name = "bob" label = "Bob" } button { action = #{bean.submit} } } I've actually wrote a C code generator DSL over the top of Win32 many years ago that did this so the financial app I was working on so we didn't have to write millions of dialogs in win32 loops.

KotlinFX defines something a bit like this.

That said, I found FXML + IntelliJ to be quite painless. The closing tags are verbose when you have small toy examples but in big files they help orient you by reminding you what the end of a block is. And I mostly use Scene Builder anyway.

Re: Java Developers

#220

I totally agree with the original poster. I picked up Java in the mid-90's for server-side dev. Grew to loathe it. When Google announced an open-source OS for mobile - I was so happy. But ... Java. Broke my heart. Don't Google have any taste. At least Google could bless an alt-Java Swift-ish alternative like Kotlin, Xtend, AnythingButJava.

They don't really need to bless it, do they? Any JVM language that targets Java 6 should work.
Post reply on HN