Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rdf4j-dev] Java naming conventions for IRI vocabulary constants

Hi Jeen,

thanks for the initiative.

We are widely using the constants in our code base (especially RDF, RDFS, and OWL) and have followed the RDF4J naming scheme for our own vocabularies.

From my side: I am also very much in favor of keeping the class names upper case (makes it also easy to read that these are vocabulary constants). Regarding the field names I do not have a strong opinion - likely switching to camel case is the better option (to better match the local name of the property / class).

When changing this I would be in favor of having one release, where both variants (the existing one and a potentially different one) are present - makes it a bite more easy to migrate. Note that for me it's fine to do this in a 4.x release and do the breaking part in 5.x.

For the repository configuration constants: looking really forward to have this cleaned up. The namespace proposal you have makes sense - I'll also shortly comment on the PR. For the change in repository configurations I would however vote for having the backwards compatibility over one major release - as this does not only affect code, but also serialized repository configurations.

Best,
 Andreas



Am Sa., 25. Feb. 2023 um 13:29 Uhr schrieb Bart Hanssens (BOSA) via rdf4j-dev <rdf4j-dev@xxxxxxxxxxx>:
Hi,

Also in favor of keeping java class names all uppercase.
CamelCase for property names etc is fine with me, no real preference for one style over the other...

Best regards

Bart

From: rdf4j-dev <rdf4j-dev-bounces@xxxxxxxxxxx> on behalf of Florian Kleedorfer <florian.kleedorfer@xxxxxxxxxx>
Sent: Saturday, February 25, 2023 7:22
To: rdf4j developer discussions <rdf4j-dev@xxxxxxxxxxx>; Jeen Broekstra <jeen@xxxxxxxxxxxx>
Subject: Re: [rdf4j-dev] Java naming conventions for IRI vocabulary constants
 
I like your first suggestion (CamelCase for constants) a lot. It allows you to use the term's localname 1:1 as the constant name and it works better in IDE autocompletion.

The second suggestion (CamelCase for class names) is less intuitive for me. I like all caps for vocabularies as it sets them apart from other classes, which helps finding them in large libraries.

Best
Florian
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
_______________________________________________
rdf4j-dev mailing list
rdf4j-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/rdf4j-dev

Back to the top