Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specification should recommend function names #432

Open
fulldecent opened this issue Apr 20, 2021 · 5 comments
Open

Specification should recommend function names #432

fulldecent opened this issue Apr 20, 2021 · 5 comments

Comments

@fulldecent
Copy link
Contributor

fulldecent commented Apr 20, 2021

The specification at https://github.com/google/open-location-code/blob/master/docs/specification.md

defines required functionality (e.g. function) for implementations.

To improve consistency across implementations, tighten the specification to include recommended function names. For example:

  • a method to convert a latitude and longitude into a 10 digit Open Location Code
    • Consider to name this function xxxYyyyZzzzz or XXX_YYY_ZZZZ

Yes, this assumes people are using object oriented languages. I understand that not everybody uses object oriented languages and they will need to consider longer function names. Also, I am left-handed and I know that when I approach a pair of scissors that they are designed for the rest of the world and not me.

@bocops
Copy link
Contributor

bocops commented Apr 20, 2021

Isn't this mostly covered by API.txt already?

@fulldecent
Copy link
Contributor Author

Yes. That file is normative and it should be merged into the specification file.

Or at a minimum it needs to be linked.



P.S. Here is an example of a specification that is expressed in a slightly informal way: https://eips.ethereum.org/EIPS/eip-721

I came to the Open Location Code project repository expecting to find at least this level of formalism in its specification.

I am able to contribute a specification of this calibre here and also update the project to be self-consistent across all the languages. I'm checking with my clients to see who can sponsor my work on this. And also I'm testing the waters here to see what appetite you have for accepting changes in this project. :-p

@fulldecent
Copy link
Contributor Author

Recommended tag: specification

@fulldecent
Copy link
Contributor Author

Also, the specification in https://github.com/google/open-location-code/blob/master/API.txt conflicts with the specification at https://github.com/google/open-location-code/blob/master/docs/specification.md

The former states that every function "should" be implemented and the latter states that some "must" and others "should" be implemented.

I am considering that these words are being used as defined in RFC 2119. And therefore those statements are incompatible.


I have a proposed specification that fixes this and other issues. PR coming.

@fulldecent fulldecent mentioned this issue Jun 4, 2021
9 tasks
@fulldecent
Copy link
Contributor Author

This is fixed at #463

All normative notes about function names are moved into the new Open Location Code API Specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants