[Tagging] Reviving the conditions debate

Eckhart Wörner ewoerner at kde.org
Wed Jun 13 15:29:07 BST 2012

Hi Martin,

Am Mittwoch, 13. Juni 2012, 15:47:12 schrieb Martin Vonwald:
> For example the self-defined conditions. Not elegant in my opinion,
> improvable, but quite nice!

The only advantage of self-defined conditions is that you can remove some redundancy when two tags contain the same subset of conditions, e.g. applies in situations like this:
maxspeed:hgv:(weight>7.5):(Mo-Fr 08:00-16:00):forward=50
maxspeed:hgv:(weight>7.5):(Mo-Fr 08:00-16:00):backward=30

In this case one could somehow define:
heavy_trucks_during_week ≔ hgv:(weight>7.5):(Mo-Fr 08:00-16:00)
And then write the tags as:

I'm not sure that's a real improvement (note that with the Access Restrictions 1.5, the definition of heavy_trucks_during_week is slightly more complex.)

> >> However your example "access:lgv?wet.speed" is a good one against the
> >> 1.5 proposal. But why not combine those proposals? This would result
> >> in "maxspeed:hgv?wet". I read this as "the MAXSPEED for HGV IF (the
> >> question mark) weather is WET is ...". Sound reasonable to me.
> >
> > More reasonable than "access:lgv?wet.speed", yes. But how is it easier
> > than "maxspeed:hgv:wet"?
> Simply because it uses different separators for different purposes.
> The : is used often for subkeys. It is not a good choice here. The 1.5
> uses the ? in front of the condition. So it is obvious where the
> condition starts. IMO a good approach.

The : is always used for subkeys, because that's the definition of a subkey. I'm not sure what you want to express here.
About "different purposes": hgv is just short for "I'm driving a heavy goods vehicle", i.e. just another condition (that can be evaluated to true or false).


More information about the Tagging mailing list