Live data from Hacker News

Why and how I write Java

stevewedig.com

11–20 of 67 posts

Re: Why and how I write Java

#12

A little surprised Spring is not mentioned. Composition in Java is a nightmare without Spring, and you can do some really interesting things in configuration that would take you days of writing initialization code in very little time. If not for Spring, I'm not sure I would want to construct things in Java at all.

He does mention Dependency Injection briefly. Anyway Spring is just one option (e.g. Guice is another one).

Re: Why and how I write Java

#13
post #3

> 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?

For most programming, as long as your algorithms are not stupidly slow, clarity is more important than efficiency. In certain situations (video games, embedded devices with few resources) this is less true, and things like the ability to do manual memory management becomes a lot more important.

This is more or less how I interpreted the statement. But grammatically it's hard to parse and I felt it needed a lot of clarification. You're assuming the memory model was the cause of a loss of application clarity but I know many programmers that don't actually feel this is the case.

Re: Why and how I write Java

#14
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.

Re: Why and how I write Java

#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.

Re: Why and how I write Java

#16

> 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/

Re: Why and how I write Java

#17
post #8

Not sure if the author of this post is on or not but what did you mean when you say you use java for scripting?

I took this out because it was unclear. I meant scripting in the sense that Python and Ruby are called "scripting languages". One possible policy is to use Java for your application, and something like Python to write scripts for stuff like devops or whatever else "scripting" is. Instead of this, I prefer use one language as much as possible, currently Java.

Re: Why and how I write Java

#18

> 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?

I've tried explaining this using terms like system programming or high efficiency programming. I guess it is best to just say "explicit memory management", so I updated the post.

Re: Why and how I write Java

#19
Do you use a framework for routing and handling HTTP requests, or just servlets? What about accessing the database, if any? I assume you're not using Java EE.

EDIT: For iOS, http://j2objc.org/ can help you share code between platforms, but you'll still do the UI and other platform-specific things in ObjC.

Re: Why and how I write Java

#20
post #3

> 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?

For most programming, as long as your algorithms are not stupidly slow, clarity is more important than efficiency. In certain situations (video games, embedded devices with few resources) this is less true, and things like the ability to do manual memory management becomes a lot more important.

not most programming. For client side ui work maybe, but pretty much everything I do algorithmic efficiency is a big concern. It's this sort of attitude that gives java it's reputation for being slow and results in behemoth's of software like weblogic.
Post reply on HN