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

Why are ids a thing ? #7

Open
D-Maxwell opened this issue Dec 31, 2022 · 0 comments
Open

Why are ids a thing ? #7

D-Maxwell opened this issue Dec 31, 2022 · 0 comments
Assignees
Labels
planned Features to be added

Comments

@D-Maxwell
Copy link
Owner

While conceptualizing Crated, I heavily took inspiration from HTML, and more specifically, from its element classification.
In HTML, an element may be accessed by its tag, id, or class. As I had in mind a somewhat similar system, maybe even one that could be translated somehow, I set my mind into such a system, without really thinking about the id part that much; which lead me to implement it, (wrongly), despite it not being needed at all.

What I mean by wrongly, is that ids are supposed to be unique; in that case, what would be the point of having multiple ids on a single object? Since no cross-reference is possible (i.e. two objects sharing an id), might as well join the two ids into one, or make it a class if it is intended to be used by more than a single element. What even is this obsession with singularities? One is just a number, a value, it doesn't hold much value in this scenario; and for simplicity reasons, as to not over convolute the project, I think I will be dismissing ids entirely, not just their ability to be multiple on a single object. (i.e. storing ids as a list of strings)

In the end, the behaviour of a class can absolutely supersede the use of an id. The only point of ids in HTML is for headers and really just links.
Except, this feature, which is so far the only reason for ids to even exist in the first place, will not be implemented this way into Crated.
I obviously still need quite some time to complete the potential implementation of links and references, as it is still nothing more than an idea in the back of my mind, and a few notes here and there.

TL ; DR – Bye bye ids, long live classes !

@D-Maxwell D-Maxwell added the planned Features to be added label Dec 31, 2022
@D-Maxwell D-Maxwell self-assigned this Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planned Features to be added
Projects
None yet
Development

No branches or pull requests

1 participant