Live data from Hacker News

Java Developers

nsainsbury.svbtle.com

271–280 of 321 posts

Re: Java Developers

#271
post #122

Earlier quoted context omitted.

Just had a look at jDBI and it doesn't exactly look like a simple library to me. There's a lot of run-time annotation processing. Have a look at jOOQ if you haven't seen it yet. There is a pre-compilation stage which generates DAO for you and they can then be used with static type guarantees.

That pre-compilation step, though... How does that play with the IDE? I'm looking into various (more) modern ORM/DB-talky-to-things, and checked out jOOQ but was turned off by that pre-compilation step. I like having my errors bright and red when I type. I also don't like code generation. I'm not closed-minded to it, just don't like it if I can avoid it.

> That pre-compilation step, though... How does that play with the IDE?

It doesn't integrate with the IDE and I am not too fond of it either.

But if you want ORM as a library in Java, I don't think there is any other option possible. Java has no meta-programming support, and annotations are going to be processed at run-time which is even worse than pre-compilation.

Re: Java Developers

#272
post #134

Earlier quoted context omitted.

There are many models: - OO like in Smalltalk - OO like in SELF - OO like in BETA - OO like in CLOS - OO like in COM - OO like in Haskell - OO like in C++ - OO like in Eiffel - OO like in Ada - OO like in Sather A few more models might exist.

HyperCard and AppleScript. And JavaScript is pretty unique at this point. Scala's OO is also pretty unique with traits and type members.

How unique is JavaScript from SELF?

In regards to Scala, I would say OCaml has similar capabilities.

Re: Java Developers

#273
post #182

Earlier quoted context omitted.

The point about defining a new language is that the abstraction doesn't leak, whereas frameworks generally leak left right and centre.

According to Joel Spolsky all abstractions leak: http://www.joelonsoftware.com/articles/LeakyAbstractions.htm...

Does assembly language leak compared to machine code? That is, does mnemonic names for machine code instructions leak?

Re: Java Developers

#274

Earlier quoted context omitted.

Doesn't change the point. It's called JAVA but with lazy streams and closures, everything Java culture built prior that will be moot and that's what the article is pointing at. Same thing happened in PHP land, people say PHP is great now, but what is PHP ? PHP5, which is a perlish javaesque thing ? or the regex craze html implicit template system that was PHP4 ? ... OOP is too verbose by it's essence compared to clos…

> OOP is too verbose by it's essence compared to closures. Could you comment on Smalltalk's blocks?

I never used ST, I thought a block == closures, but according to http://c2.com/cgi/wiki?SmalltalkBlocksAndClosures there were differences until they wanted to make blocks real closures.

edit : I should have said closures + curryfication so you can partially augment the creation of a final callable entity that binds many parameters (similar to an object constructor arguments)

Re: Java Developers

#275
post #40

Earlier quoted context omitted.

The main advantage is when doing something like this is Haskell the code you pass around can't have arbitrary side effects, so you don't actually need to worry so much about where it is called.

Yeah, I agree that having no side effects helps quite a bit. But you still need to understand control flow to reason about time and space complexity, which are a sort of "unavoidable effects".

If "it is almost impossible to understand control flow in Haskell" as you posit, then how are so many people making time and space efficient Haskell libraries?

Re: Java Developers

#276

Earlier quoted context omitted.

> 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. Seems like we are working on very different kinds of systems. Right now I'm working on Hadoop-based data pipeline. While Hadoop itself is mostly written in Java, many recent tools like Spark or Kafka are created in…

> Python with its main web framework - Django - is really shiny. I would say, it is one of the best web frameworks ever For small sites, maybe. Once the codebase gets large, it becomes much harder to maintain than a Java webapp of similar complexity written in a sane framework.

Intagram's website is small? Ok, so show me the large one written in Java. But let's agree: this should really be web site/web interface, not some back-end service in large distributed system like Twitter or LinkedIn, because in such systems there's a great mixture of the whole bunch of different languages.

So far list of websites written in what I used to think of "sane Java framework" (Spring Web) is not very impressive [1] compared to Instagram, Washington Post or Reddit.

[1]: http://spring.poweredsites.org/top

Re: Java Developers

#277
post #234

"I’m an Android developer, stuck using Java. It’s breaking my heart." Glad that I am not alone.

Definitely not alone.

At the Google IO Android Fireside Chat, a developer asked the Android team about using an alternative to Java for development - Scala in his case. Pretty much 'no' was the response. But don't Google have any taste. Kotlin or Xtend imo are lighter than Scala and would be good fits for Android.

Re: Java Developers

#278
post #172

Earlier quoted context omitted.

> 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. Seems like we are working on very different kinds of systems. Right now I'm working on Hadoop-based data pipeline. While Hadoop itself is mostly written in Java, many recent tools like Spark or Kafka are created in…

What about OOP in Django? Controllers are just functions on module level, models are just "poor" records for storing data (no behaviour), ORM is singleton-based. So I would say it's procedural, not object-oriented, at least, not in Java sense. Strongly disagree. The internals of Django are full of inheritance and mixins (a form of multiple inheritance), and so are the class-based views and the forms. The CBV class hi…

> The CBV class hierarchy is complex enough that someone had to make this site to help everyone keep them straight: http://ccbv.co.uk/

It's funny how your comment compromises OOP - even in Django class-based views make things complicated :)

Anyway, I didn't mean that Django doesn't use OOP at all or forbids you to do so, but rather that it provides another approach (mostly procedural) and pretty successfully. Most people outside the OOP dome actually know that this paradigm is good for particular tasks. But what people under the dome don't know is that there are many other approaches that work not worse, and often even better than OOP.

Re: Java Developers

#279
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…

Compared to the real functional languages (Haskell), the only reason I can think of that scala is called a functional language is because the community would be insecure in their smugness otherwise. You can totally use scala as a better java dipping into FP occasionally as you would in C#. It's not like say F#, which really forces you into a functional mindset.

Post functional is as vacuous as post modern, ultimately these labels are not meaningful.

Re: Java Developers

#280
post #262

Earlier quoted context omitted.

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.

You might already be familiar with it, but this looks a lot like QML.

I wasn't actually - never used Qt (been stuck in win32 and Wx). Thanks for pointing it out :)
Post reply on HN