News for hackers. Stuff that matters.
Re:JavaScript is Good, Actually by realharo on Wednesday May 16, 2018 @04:13AM (#17080769)
You should try Kotlin. It solves exactly this pain point - creating classes for data structures is very terse and easy.

You can have a one-liner class like

    class Person(val name: String, val email: String, val yearOfBirth: Int? = null)
Or you can make it a `data class` and get automatic `equals` and other things.
Re:JavaScript is Good, Actually by worldsayshi on Wednesday May 16, 2018 @09:39AM (#17082258)
Thank you for telling me. I've been hovering around this possibility since I'm using Intellij and am the primary owner of the code. Although I'm also keen on this code being as accessible as possible for the rest of the organisation and few has even heard of Kotlin.

When I suggest switching to Kotlin everyone's always smiling dismissively like "ah, you with your crazy ideas again".

Might do it though. Maybe.

Re:JavaScript is Good, Actually by ben509 on Wednesday May 16, 2018 @10:05AM (#17082444)
Don't ask, do it. Asking is a great way to get shot down. Write something smaller in Kotlin, then show people what it looks like. It is heavily interoperable with Java, so you could move some of the boilerplate heavy classes over.
Re:JavaScript is Good, Actually by sbalea on Wednesday May 16, 2018 @07:40AM (#17081590)
Concepts borrowed (in a simplified form) from Scala.