DEV Community

Discussion on: Will Java Trend Towards Obscurity?

 
jbristow profile image
Jon Bristow

True, but I almost never had to just "cast and hope" with clojure calling java code. When it comes to "serious" java (read: "enterprise class" with as much derision as possible) reflection tends to become involved and Kotlin's type system is quite a bit more conservative.

I agree about the awkwardness of

(let [b (SomeBean. )]
  (.setA b a-value)
  (.setB b b-value)
  b)

I tended to hide those away under the rug.

Thread Thread
 
pancy profile image
Pan Chasinga

That was spot on. I love functional programming and Clojure got me for a while until I had to do exactly that.

In my wildest dreams I see Lisp becomes a mainstream language people use to teach and learn programming. I'm still writing Scheme on the side sometimes.

Thread Thread
 
jbristow profile image
Jon Bristow

Tangentially, looking at my let, I saw a familiar construct staring back at me:

val b = SomeBean().apply {
  a = aValue
  b = bValue
}
Thread Thread
 
pancy profile image
Pan Chasinga

LOL. Actually Kotlin stole quite a lot from Scala, which is a functional language inspired by Lisp. So your observation wasn't wrong.