-
Notifications
You must be signed in to change notification settings - Fork 64
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
Naming convention for temporal types #18
Comments
Many thanks Krishna for this great analysis. My personal perspective is based on the following premises:
The rationale for having the user (external) types named as As for the suffixes one could favor On the other hand, regarding the developers' world, a precise naming should be used to convey the idea that the algorithms vary considerably for the different durations. For this reason, I would favor the more precise class names you used in MEOS, that is Regarding the issue of temporal duration before or after the base type we can follow usual practices in C++. Indeed, when defining instantiations of STL template classes it is often the case that the base type comes before the template type as in
This is taught, e.g., in MIT Programming courses and used in well-known libraries such as SWIG, JGL, and MS Visual Studio. From a user perspective I think Regarding the naming of temporal geometry/geography points, in the context of a Master's thesis we have been working on a first implementation of a generic As an example, when determining the temporal distance in MobilityDB we use derivatives to understand when two moving points are at the shortest distance to add this additional timestamp as a turning point when computing the distance. This is possible since these are derivatives of linear functions, but this is no longer the case for rotating 3D geometries. We don't even know whether a derivative for the function representing the movement of 3D rotating polygons exists. Therefore, although we are aiming to have in the future a generic To summarize, these are my preferred naming conventions.
|
I think this is a very good middle ground approach. I think I would be good to follow the I was thinking that only downside would be that in C++, because of how templating works, I would still have the base type at the end. i.e, Also, just to clarify further, when you say we should differentiate between users and developers - do the developers here mean in a general sense or the developers/contributors working specifically on MobilityDB? I understand is that by users you mean to refer to the public/external API and by developers you mean the more internal classes and functions - But in the case of MEOS it becomes a bit more overlapping as its users would be developers in the general sense, who might want to interact with these to build their projects. |
The type names have been changed in the develop branch. This implied a renaming also on many C functions. The resulting code is much more clear since it better highlights the variant of the temporal type that we are manipulating in a function. |
Overview
Right now there are two ways of naming being followed for temporal types.
After a small discussion with @estebanzimanyi and @mahmsakr, we felt it might be a good idea to get a more external perspective on this before making the final call.
Approach 1
This approach is followed currently by MobilityDB's main database codebase
This approach is also followed currently by MobilityDB's python driver codebase
(Although a slight change in terms of case sensitivity - which I think is fine considering C vs Python)
Approach 2
This approach is followed currently by MEOS's codebase
This approach is also followed currently by PyMEOS
(Although a slight change being the base type being included within the class name itself as Python doesn't support template parameters)
Comparision
The case for Approach 1
Set
), more close to English and hence sounds more naturalThe case for Approach 2
temporals
instead oftemporal
)One other point to note is that in Approach 1, base type comes before the temporal duration, while it is the reverse in Approach 2. Example:
TIntInst
vsTInstantInt
. I cannot objectively say which is better here. But the rationale behind these were:Base Type before Temporal Duration
tint
, andtgeompoint
Temporal Duration before Base Type
TInstant<int>
TInstantInt
to become something likeTInstant
with a dtype on the object representing the base typeConclusion
I hope the above gives more context and insight to make the right decision. We can use this issue to collect community feedback and decide accordingly.
The text was updated successfully, but these errors were encountered: