What is Cultural Javism?
Haven't you heard about Cultural Javism? It's terrible! đ±
For those unaware, here's a taste of it.
You know w...
For further actions, you may consider blocking this person and/or reporting abuse
Speaking about counter-culture, as I fullstack developer I feel with ES6+ & Angular2+ especially,
JavaScript is trying to become like Java.
If by "ES6+" you just mean the
class
keyword and the associated classical OOP features, I can see the argument. But most of the features since ES6 have nothing to do with classical OOP, so if anything it's just continuing to diverge further away from Java. Usually new TC39 proposals cite Java implementations as prior art only among a large number of other languages, and it rarely seems to be the biggest influence design-wise.Maybe I'm missing something as I don't know much Java, but how does
validator
know what it's validating when it's called asvalidator.validate()
? Surely it needs to bevalidator.validate(this)
?In this example, the
validator
only illustrates what you can do within the custom constructor ofrecord
; on a real code base, you would most likely need a different implementation for the validator. Or you can opt for an even more straightforward implementation without any validator.I'm studying DOP lately, so I felt like a validator feat nicely on this example.
PS.: The validation can be done like this:
new Validator.validate()
, using reflection, but it's not a standard (nor a simple) way to do it. I strongly do not recommend the usage of reflection to do this.I'm glad i'm not the only one confused by that
I worked on some projects with Kotlin until I discovered that I couldn't avoid NullPointerExceptions from third-party libraries.
Now, I use modern Java too.
I strongly agree with Fernando's point in this post, and I wrote a related short post: Get Started with Modern Java Today: A Concise Guide
One often wonders how the JVM turned out so good, while its de facto language turned out so poor.
I've always been a spiritual member of the Java counter culture - so consider me part of the movement :)
Kotlin is a good JVM language (when using third-party libraries written in Kotlin)
You are the only person in the world who makes Java good, big fan
Thanks!! đâ€ïž
Awesome!