Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

And while I'm distracted onto the topic of names...

Today's project is starting to implement Multiple Choice. (AKA enumerations.) The concept has existed for a long time, but it's a manual PITA to create a multiple-choice Property, and I'm tired of it, so I'm turning it into a proper Type. That's complicated, but so far well in hand.

But as part of it, I've been staring at all these places that are using the Link Type, which is the underlying basis of Multiple Choice. Link is *the* most important Type in Querki -- it's a reference to a specific Thing, basically the equivalent of a "pointer" in most programming languages. (Multiple Choice is implemented as a Link Property to a particular Model, whose Instances are the options to choose from. That's very powerful when you need the power, but like I said, a pain in the tuchus to build one; time for a proper wizard that hides the details of what's going on for the common cases.)

Anyway, I am suddenly realizing that "Link" is also a terrible name. Specifically, while it is *technically* quite accurate, that accuracy is mostly irrelevant: the pointer gets auto-dereferenced in almost all circumstances, so the fact that it *is* a pointer is rarely useful to the end user. Mostly, it's taking brain space for no good purpose -- as far as the user is concerned, it's just a Thing. So I should probably change the name of the Type.

I can't just call it "Thing" -- that's already the base Model for the entire Querki universe, and is quite central -- but I'm tempted to use "Something". That's vague, but that's kind of the point: when you're referring to a value of type Something, it can literally be any non-primitive value in Querki. (Including Properties, Types, People and so on.) In practice, you can restrict the Model that a given Property can point to, and we'll eventually enhance the functions to preserve this typing in the code -- basically implicit generics -- but conceptually, it's just "Something".

The vagueness kinda bothers me, but I don't have a better idea yet, and it seems to relate in an appropriate way to the concept of "Thing" -- a value of type "Something" contains one or more Things. Opinions?
Tags: querki
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 10 comments