News for hackers. Stuff that matters.
Re:OO is not Computing, Newer is not More modern by groovy2shoes on Monday April 30, 2012 @07:34AM (#3908776)
There are a lot of Java-only OO-proponents in the corporate world.
Re:OO is not Computing, Newer is not More modern by babarock on Monday April 30, 2012 @07:44AM (#3908806)
Agreed with parent. Come take a stroll in my office; I work in a coporate bank. Most of my coworkers learned "real" programming in the 90s, when Java was the hot new thing on the block. To most of them, the whole Programming Language eco-system can be summarized to an endless "C++ vs Java vs C#" flamewar.

Just yesterday a colleague of mine looked at me with chock and awe when I told him I enjoy coding in C. "But... it's not OO!" he mumbled, puzzled.

Pushing the caricature a little further, Python and Ruby are toy languages that only hipsters use, Perl is only to be used by the sysadmin down the hall, and Lisp is the biggest failed experiment programmers ever came up with.

Pointy-haired bosses encourage this kind of thinking: They would never get in trouble for chosing a language amongst the big 3 (C++/C#/Java).

I once heard someone say: "I don't understand why there are still new languages coming out every day. Shouldn't everyone just use Java?"

Re:OO is not Computing, Newer is not More modern by jasonlotito on Monday April 30, 2012 @08:20AM (#3908891)
> can be summarized to an endless "C++ vs Java vs C#" flamewar.

As opposed to an endless "Ruby vs Python vs PHP" flamewar?

Pushing the caricature a little futher, C++ and Java are enterprise languages that only old out-of-touch programmers use.

Hipster Apple-using kids encourage this kind of thinking: They would never be un-cool for choosing a language among Ruby, Python, or Lisp.

It's far too easy to become that type of programmer. Choice of language has little to do with it. No doubt you understand this, just making the point clear.

Re:OO is not Computing, Newer is not More modern by babarock on Monday April 30, 2012 @08:35AM (#3908936)
You sir made my day, thank you very much!
Re:OO is not Computing, Newer is not More modern by arunmur on Monday April 30, 2012 @07:39AM (#3908790)
There are equally large number of people who hate Java for no good reasons. Its all the effect of "Once a fan boy always a fan boy".
Re:OO is not Computing, Newer is not More modern by groovy2shoes on Monday April 30, 2012 @07:58AM (#3908834)
While I agree that some people hate Java because of hearsay, many people do have good reasons -- reasons that often have little to do with Java as a language and much more to do with the Java ecosystem. Oh, the horrors I've seen in Java codebases!
Re:OO is not Computing, Newer is not More modern by oddthink on Monday April 30, 2012 @08:39AM (#3908952)
I was just talking with a coworker about this. We agreed that much of our existing C++ code could have been written in Java without harm (we're doing compute-heavy finance, but not fluid simulation), and that would let us skip a whole lot of infrastructure pain. The only uncertainty was how easy it would be to make a Java-based Excel plug-in, but Java on Windows seemed a smaller evil than C# on Linux.

F# is interesting, Scala is interesting, and we both wondered what it would be like to really try ocaml for real. But Java's just pretty solid. It's not exciting, but it's quality engineering. It makes some questionable trade-offs, but it seems to provoke more hate than it deserves.

Of course, we then rolled our eyes about all the crazy Java stuff we've seen, with XML-everywhere, FactoryFactories, and gratuitous IoC.

That started me wondering: what is it about Java that encourages the craziness? My theory is that it's a combination of garbage collection and lack of easy blocks/anonymous functions. Garbage collection lets you get away with things that you'd never try in C++, and lack of blocks means you're stuck with a pretty limited API, so you end up inventing extra-language channels for information.

Note: I intentionally didn't demand closures. I think the original blocks in Smalltalk weren't closures, but they were still useful for things like "monkeys select: [:m | m throwsPoop]". I'm not sure if this is really enough; closures make some things a lot easier.

Re:OO is not Computing, Newer is not More modern by cageface on Monday April 30, 2012 @09:23AM (#3909103)
That started me wondering: what is it about Java that encourages the craziness?

It doesn't hurt when you're trying to rack up a lot of billable errors and keep clients dependent on you.

Re:OO is not Computing, Newer is not More modern by tetha on Monday April 30, 2012 @12:11PM (#3909825)
I think the lack of higher order functions is a huge part. If you don't have built in higher order functions, you have to add 1 interface per function taking a higher order function and 1 class per different call. From there on, you have to manage all those extra classes and interfaces somehow, which easily spawns more classes you wouldn't need otherwise.

These resulting structures then end up being factories (You could pass the object creation function), command objects (you could have a function to call instead of a command to pass back) and so on.

Re:OO is not Computing, Newer is not More modern by pjmlp on Monday April 30, 2012 @09:12AM (#3909056)
You can see horrors in any language.

The problem is called lack of skills, not the language.

Re:OO is not Computing, Newer is not More modern by groovy2shoes on Monday April 30, 2012 @09:33AM (#3909147)
Was my post too long for you? You must have missed this part: "reasons that often have little to do with Java as a language".
Re:OO is not Computing, Newer is not More modern by pjmlp on Monday April 30, 2012 @10:18AM (#3909329)
I've saw it, but the remark about the ecosystem still reflects over the language, hence my post.
Re:OO is not Computing, Newer is not More modern by groovy2shoes on Monday April 30, 2012 @10:41AM (#3909430)
My point isn't that there's something intrinsic to Java that leads to nightmarish codebases, but there must be something associated with the Java brand name that leads to it. I haven't seen such a large percentage of this lack of skill affiliated with any other language (granted, I haven't spent much time working with, e.g., VB or PHP codebases).

I don't know what it is about Java that seems to encourage the mess, but there is something.

Re:OO is not Computing, Newer is not More modern by pjmlp on Monday April 30, 2012 @12:04PM (#3909783)
You can see this in any enterprise code base.

I have seen lots of awful code, when you combine software design done by out of touch architects, with lousy enterprise coders, regardless of the chosen language.