6 ms·
I don't hate Java. It was my 2nd or 3rd language, and the one I first used professionally. But O-M-G, this feature exists in most mainstream language and has
by dudul 7y ago
I don't hate Java. It was my 2nd or 3rd language, and the one I first used professionally. But O-M-G, this feature exists in most mainstream language and has for the past decade at least.
This is nuts to me how behind Java is. Is it only due to the backward compatibility? Or is there some crazy red tapping every time something is added?
- fenk85 7y agoYeh if you want to use Java from 10 years from now minus alot of garbage and questionable decisions in Java look into Kotlin which is also 100% interoperable with Java libraries so you can lean on decades of code. We switched from Java+Spring to Kotlin+Spring and havent looked back in a few years now, for backend microservices
- vips7L 7y agoJava doesn't add features unless they're absolutely sure they want to support it for eternity and for something like text blocks why take the risk unless you're absolutely sure? Text blocks aren't something I see myself even using frequently.
- stickfigure 7y agoI whine about (lack of) text blocks every day when editing multiline SQL statements. The extra quotes and +s and spaces are really irritating.
- bootlooped 7y agoAt a previous job we started using Groovey files to store queries because of this.
- vips7L 7y agoMaybe I'm lucky but this is infrequent for me. There are better tools for most queries: https://ebean.io/docs/query/background/typesafe https://ebean.io/docs/query/background/typesafe https://www.jooq.org/ https://www.jooq.org/ http://www.querydsl.com/ http://www.querydsl.com/ https://scala-slick.org/ https://scala-slick.org/
- noisem4ker 7y agoIf you're using JPA, add the Criteria API to the list.
- stickfigure 7y agoI find these tools only work well for simple queries. For anything complicated, you spend N units of time figuring out how to make the query, then 4N units of time figuring out how to represent it in the metalanguage (often hacking around it with custom functions and operators). They are especially bad with exotic operators like postgres' JSONB columns. I ended up ripping jooq out of an app over this. There's an argument that they bring type safety to SQL, but Intellij actually validates your string literal SQL against the schema, so the benefit is marginal.
- jpgvm 7y agoIt's a combination of things. Java is slow moving by the very nature of the contributors to the language and runtime favouring slow methodical advancement. Additionally Java has a longer history than most of backwards compatible software that contributes to a higher burden of testing before making changes to the core language. Finally there is the community itself which favours high performance and reliability and prefers where possible to make use of libraries rather than change the language or runtime itself. That isn't to say Java isn't evolving or that the JVM itself is stagnant. The introduction of the Java module system allowed the JRE itself to become a much lighter dependency. Things like Project Loom seek to bring Erlang-like fiber/green thread support to the JVM and will probably land in a release soon. Also the release cadence has been changed so new releases are now landing much more frequently which is increasing the pace of development.
- pulse7 7y agoAbsence of non-essential features doesn't put a product behind other products... If Apple skips non-essential features it is seen as advantage...
- augustnagro 7y agoI'm thankful that Java hasn't become a mess like C++. The virtual machine and stdlib continue to see innovation, while the ease of implementing JVM languages like Scala and Kotlin mean that Java can let these new languages innovate, and pick the best features when they're proven (with improved performance normally too). You can see this with Lambdas, and now with Records and pattern matching
- pron 7y agoMost evolution on the platform is in the VM and tooling rather than the language, and the language is conservative and slow-moving by design (it was part of the "charter" back when Java was created). This has worked very well. OTOH, Java programmers look in astonishment at how far behind most other platforms are in GC, compilation, and observability.
- jhomedall 7y ago- Once you add a feature, you have to support from now until forever - Almost every feature added makes every feature that comes after it more expensive to add