Live data from Hacker News

Why and how I write Java

stevewedig.com

21–30 of 67 posts

Re: Why and how I write Java

#21

> High efficiency languages include C, C++, Rust, D, etc. I would love one language to rule them all, but it seems that for now there is still a gap between what language to choose application programming and for high efficiency programming. What is this supposed to mean?

It was also pretty weird to see Erlang on that list. Erlang may be good at parallelism, but I've never heard that BEAM is especially fast at sequential operations. edit: s/linear/sequential/

Given that he's a web programmer, I presume "high efficiency" in this case means "getting the most out of the hardware" in a more general sense, to which "idiomatic code is automatically concurrent" contributes quite a lot in some cases.

Re: Why and how I write Java

#22

> With Java I have one language that can target servers, Android, and browsers via Google Web Toolkit (GWT). Credibility shot. He's a fan of GWT. That explains a lot.

GWT may not be fashionable, but the compiler and other development tools are very advanced, and big Google products use it. So I'd think twice about bashing it.

Re: Why and how I write Java

#23

Having been exposed to OCaml, I'm starting to think that if you have null references, you don't really have static typing. I guess I'll have to look at guava, but it can only help so much in interacting with other code.

As a rubyist by day this is the thing I find so exciting about Haskell. I write dynamically-typed code all day, and the most common bugs are not because of passing an Apple to an Orange interface—that just isn't very common—it's because of cascading nulls. Of course Java's static checks are worth something, but not much more than the most cursory of checks that my basic test coverage does in Ruby.

Re: Why and how I write Java

#25
post #15

> With Java I have one language that can target servers, Android, and browsers via Google Web Toolkit (GWT). Credibility shot. He's a fan of GWT. That explains a lot.

I really like GWT. I will be writing some posts that will go into more detail.

I kid... partly. What I can't get over is a common justification for using GWT seems to be "but you can program in java and Swing then!", which only holds for fans of Swing. It seems is most often advocated by people uncomfortable with Javascript development and little UI development experience outside of Java.

I don't think Swing is terrible but I do think it isn't particularly productive for user interfaces compared to Javascript or even Objective-C, C#, etc.

So if all you have a Java/Swing hammer then GWT is great, otherwise not so much.

In any event, I look forward to your post.

Re: Why and how I write Java

#26

Having been exposed to OCaml, I'm starting to think that if you have null references, you don't really have static typing. I guess I'll have to look at guava, but it can only help so much in interacting with other code.

And especially not if you have type erasure.

Java makes you type class names, and the compiler makes you cast things, as for it being a statically typed language, I'm not really sure.

As with most things java it's a lot of typing for not a lot of accomplishing anything useful, but somewhat better than C.

OCaml/F#/Scala have far better type systems that check a lot more things, and require less typing.

Re: Why and how I write Java

#27
post #15

Earlier quoted context omitted.

I really like GWT. I will be writing some posts that will go into more detail.

I kid... partly. What I can't get over is a common justification for using GWT seems to be "but you can program in java and Swing then!", which only holds for fans of Swing. It seems is most often advocated by people uncomfortable with Javascript development and little UI development experience outside of Java. I don't think Swing is terrible but I do think it isn't particularly productive for user interfaces compare…

No worries then :) I'm comfortable with JavaScript and I've never used Swing.

I just use GWT to reach the browser, not to embrace it as an all encompassing framework or anything. I use Bootstrap as the UI starting point.

Re: Why and how I write Java

#28
post #26

Having been exposed to OCaml, I'm starting to think that if you have null references, you don't really have static typing. I guess I'll have to look at guava, but it can only help so much in interacting with other code.

And especially not if you have type erasure. Java makes you type class names, and the compiler makes you cast things, as for it being a statically typed language, I'm not really sure. As with most things java it's a lot of typing for not a lot of accomplishing anything useful, but somewhat better than C. OCaml/F#/Scala have far better type systems that check a lot more things, and require less typing.

> OCaml/F#/Scala have far better type systems that check a lot more things, and require less typing.

Sure, Java's type system isn't that awesome. But it's better than not having compile time type checks.

Re: Why and how I write Java

#30
For me, this was the most amazing thing about this post:

"Programming with explicit memory management: This bucket includes C, C++, Rust, D, etc. I haven’t needed to explicitly manage memory, so I haven’t used these."

I guess I'm just old.

Post reply on HN