Thought I'd mention...
I was just testing some stuff in a standalone/plugin project (so has to
be binary 11) for an in progress NB PR. Made a change in a file I
haven't been in for a while, saw several hint flags, in this case for
both instanceof and switch pattern matching, made the changes; cleaner,
more supportable, so nice. Last week I chased down some places where
functions were returning arrays stuffed with two or three values (cause
I didn't want to build a class for just a few local uses), changed
Object array to record with typed fields; very much more supportable.
Using these newer language features isn't "can't live without it", it's
incremental improvement in code quality for something that has to run on
JDK-11. Hints are great.
-ernie
On 10/5/22 10:47 AM, Jaroslav Tulach wrote:
Hi.
Recently I brought [Frgaal retrofit compiler](http://frgaal.org) to your
attention again. There was a [PR-4682](https://github.com/apache/netbeans/
pull/4682) and then a discussion in the thread about (not) supporting ecj in
NetBeans: https://lists.apache.org/[email protected] - thank
you for your comments.
It all boils down to a simple question: Shall NetBeans try to improve
shortcomings of the JDK?
I have recently given a talk [Forget/Ignore Kotlin, use Java19](https://
www.youtube.com/watch?v=ua-8ySwFgqg). There is a slide describing the benefits
of Kotlin around 5th minute. Clearly the fact that the Kotlin language quickly
evolves and still can be used to generate JDK8 code is a huge benefit.
Frgaal (described around 25 minute) can do the same. It has been modeled to
mimic the Kotlin model:
- language specification independent of the JDK
- compiler version specified as part of project build script
Moreover Frgaal is 100% compatible with future Java language specification -
easy to drop it after switching to newest JDK. Overall it is way easier to
adopt latest Java thru Frgaal than trying to switch to a completely new
language. Why do I have to explain it again and again?
NetBeans can support Frgaal without any problems as it is also (just like nb-
javac) a member of the Javac family. All these compilers generate exactly the
same errors and provide the same WYSIWYG experience. Same errors in the IDE,
same on the command line, same on the CI.
All that is needed is: We have to realize that "innovation happens elsewhere"
and make Java better than the one produced by the JDK team!
Anyone has guts to follow better-than-JDK vision? Then let me integrate Frgaal
into NetBeans and bring the latest Java language features to users of older
JDKs.
-jt
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists