[PATCH 01/18] text: Add language and text-direction to protocol
Pekka Paalanen
ppaalanen at gmail.com
Wed Apr 10 03:51:01 PDT 2013
On Sun, 07 Apr 2013 21:51:44 -0400
Weng Xuetian <wengxt at gmail.com> wrote:
> can't this be extended in a way that in a more key value like favor?
>
> Input method annouce what value it's interested first, and text_model
> set the corresponding value upon change. Now, for every field you
> want to set, will introduce a new protocol.
>
> Text, Numeric, Accept sound recignotion, extra button on OSK, and
> there can be so many possiblility which this way doesn't scale at all.
Hi,
the general problem with key/value or arbitrary properties is that they
break easily, and you can create a huge mess without really even
realizing it. The point is, that if one side of an IPC sets a property
the other side does not know to look for, the system will silently
misbehave, because the first side does not know that the other side is
not using the property.
Such mismatches are obvious, if the protocol is explicit instead of a
property system. The protocol already has also versioning, and a
standard procedure for adding new messages. Writing strict protocol
forces people to think more carefully about the design, and it also
forces them to handle version mismatches explicitly.
Properties *are* protocol, they are just easier to get wrong and not
notice. When you add new properties, you have the same versioning
problem that Wayland protocol already solved: do both sides know about
the property, and do they know that the other side knows.
Thanks,
pq
More information about the wayland-devel
mailing list