News for hackers. Stuff that matters.
Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by msluyter on Saturday July 25, 2015 @11:15AM (#9947790)
> I mean Maven really sucks

Why?

I think after a while one gets tired of using XML as a configuration language. It's verbose and not the easiest to read. Beyond that, we used to find ourselves in dependency hell with maven pretty frequently, though that hasn't happened to me in a few years.

The biggest problem, imho, is that it's inflexible. You can't just (easily) throw in a bit of functionality or make an unusual tweak to your build. So, if you can't find an existing plugin to do what you need, you have to write it yourself.

I've written a maven plugin, and the documentation/support was rather poor. I also found myself having to use an older version of various plugin libraries in order to write proper tests for the plugin. It took me a couple of weeks. Had I done all that in Gradle, I could have just thrown in a few lines of groovy and probably finished in a day.

That said, it's stable and well known. Gradle seems to have the momentum and increasing mindshare, but you probably won't get fired for using maven.

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by EdwardDiego on Saturday July 25, 2015 @08:31PM (#9949620)
> Beyond that, we used to find ourselves in dependency hell with maven pretty frequently

You'll hit that with Gradle, Ivy, Leiningen, SBT and Buildr too.

> The biggest problem, imho, is that it's inflexible. You can't just (easily) throw in a bit of functionality or make an unusual tweak to your build. So, if you can't find an existing plugin to do what you need, you have to write it yourself.

I'd also call that it's biggest strength. Maven POMs are only ever declarative. I've never hit a FOSS project using Maven that I couldn't build, but I've hit plenty using SBT or Ant that I had to tweak to build.

> I've written a maven plugin, and the documentation/support was rather poor.

I had the same experience with Gradle's DSL documentation, although having a look at it now, they've dramatically improved it since then.

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by vorg on Saturday July 25, 2015 @06:51PM (#9949359)
> Had I done all that in Gradle, I could have just thrown in a few lines of groovy and probably finished in a day

"Probably"? "Thrown in"? Perhaps you can cut and paste build scripts between Gradle projects, but write anything more than "a few lines" in Groovy and you're looking at huge maintenance problems, like something that evaluated as ["abc", "defg", "hij"] suddenly becoming ['a', 'b', 'c'] for reasons that become apparent only after hours of printing debug messages.

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by tootie on Saturday July 25, 2015 @01:09PM (#9948202)
I think that calling something verbose and unreadable is an oxymoron. XML is very explicit about what each field is labeled. Having an XSD means you always know what field is available where and what type of values are permitted. BUT, if you're still not happy, there's always polyglot maven[1]

[1] https://github.com/takari/polyglot-maven

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by rattray on Saturday July 25, 2015 @01:21PM (#9948245)
Why why why do do do you you you think think think that that that a a a language language language that that that was was was verbose verbose verbose could could could not not not also also also be be be unreadable unreadable unreadable ?<question> ?<question> ?<question>
Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by drdeca on Saturday July 25, 2015 @02:20PM (#9948462)
It took me until the question marks to realize that the words were repeated.

Weird.

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by dragonwriter on Saturday July 25, 2015 @02:42PM (#9948535)
> I think that calling something verbose and unreadable is an oxymoron.

Verbose and unreadable are not contradictory descriptions. In fact, they are more complementary descriptions -- there is a reason that in natural languages one of the most frequent recommendations for clear and readable writing is to be concise.

Excess verbosity is bad for readability.

Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by mahmoudimus on Saturday July 25, 2015 @03:54PM (#9948771)
Indeed, but it could be argued that excess verbosity might be better for long-term maintainability. Not that I'm defending the topic at hand here: XML as a configuration language.
Re:Ask HN: Has anyone here programmed in Kotlin? What do you... by dasil003 on Saturday July 25, 2015 @01:22PM (#9948247)
Interesting you say that because I feel that XML is a bit oxymoronic a priori. They wanted something both human and machine readable, but fails to be great at either.