-
-
Notifications
You must be signed in to change notification settings - Fork 7
Chimera uses the VarHandle
API that was introduced in Java 9 to modify inaccessible fields in Brigadier classes. This is what made optional arguments and the like possible. The VarHandle
API was favoured over standard reflection due to its significantly better performance.
Local type inference, i.e. var
that was introduced in Java 10 is also used extensively in the project. We believe that it improves the legibility and quality of the codebase, hence its inclusion.
It is true that we can lower the requirement to Java 10, or even Java 9 if we remove the sweet var
syntax sugar. However, both versions do not have LTS and are no longer supported. Thereby, the decision was made to for Java 11 which has LTS, to be the minimum required version.
We fully understand that most servers and plugins are still running on Java 8; that most developers cannot/will not use the library. But regardless, we stand by our decision. If anything else, we hope this would provide an encouragement for developers to explore Java 11 and eventually make the long and eventual push for servers to adopt new versions of Java.
Early developmental builds of Chimera did contain support for caching suggestions and parsed arguments. However, we quickly ran into numerous issues that blocked progress.
Primarily was the frequency at which the server was asked to provide suggestions and the resultant cache being both bloated and stale. It further raised an issue with the cache preventing the proper cleaning-up of objects such as Player
.
In the end, we felt it to be more hassle than worth and that it can be better implemented in 3rd party custom types better if really necessary.