If you were designing an extensible protocol which has, like, commands (or methods or sth), and they have arguments, and you wanted an extension to be able to add new arguments, would you rather:
- add more positional arguments to an existing command
- use named/keyword arguments and add some of those to an existing command
- make a new <command>v2 with a new signature and leave the old command untouched
?

I know Linux kernel uses the new-command approach with syscalls, but it's not like it has a choice.

XMPP for the most part uses "keyword arguments" of sorts, where the keyword is actually an xml namespace, but I guess that's the natural thing to do when you build your protocol on top of XML.

JSON users would be like "lol what are positional arguments" because all they have is keyword arguments.

Follow

@wolf480pl

Maybe your protocol is mixing different orthogonal concerns at the same level?

Maybe your commands belong to the payload?

@Shamar good question in general.
In my case I have already split the orthogonal concerns into separate layers, and still at each layer I have a small amount of extensibility that I anticipate a need for.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.