|Re: [handly-dev] A better naming convention for model *Impl* interface methods?|
Well, if I'm not completely blind, the underscore suffix for *Impl* method names looks preferable to other previously mentioned alternatives when applied in the context of a large-scale real-world model such as the JDT Java model. You can see for yourself:https://github.com/pisv/jdt.
core-handly(master) -- the existing convention based on the h prefixhttps://github.com/pisv/jdt. core-handly/tree/naming-- the proposed convention based on the _ prefixhttps://github.com/pisv/jdt. core-handly/tree/naming2-- the proposed convention based on the _ suffixSo my +1 goes to the underscore suffix proposal now, but I'm looking forward to hearing from others.Thanks,Vladimir
A variation of the original proposal has arrived -- using the underscore as a method name suffix rather than prefix.
To my eyes at least, it looks even more readable and in fact, blends so well with the "user part" of model implementation code that it can be a bit challenging to distinguish between "framework methods" and "user methods" in things like content assist, outline popup, etc. But this is the only potential issue with this approach as far as I can see. A noticeable benefit, besides improved readability, would be that it makes possible for the framework to follow the usual conventions in naming getters and setters, so that JVM-based languages such as Xtext can provide additional support for them.
Please take a look at a version in playground that is based on this alternative proposal:
Meanwhile, I'll try to adopt it in the Handly-based fork of JDT Core to get a better feel of how it would work in the context of a large-scale real-world model.
handly-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
Back to the top