4 ms·
How did Plan 9 allow its APIs to evolve? For example, reading /dev/mouse returns records that are exactly 49 bytes, in text format [1]; how did they add new fie
by ridiculous_fish 6y ago
How did Plan 9 allow its APIs to evolve? For example, reading /dev/mouse returns records that are exactly 49 bytes, in text format [1]; how did they add new fields without breaking every app?
1: http://man.cat-v.org/plan_9/3/mouse http://man.cat-v.org/plan_9/3/mouse
- sedatk 6y agoThey’d probably have /dev/mouse and /dev/mouse2 simultaneously.
- anthk 6y agonamespace
- eadmund 6y agoAs a sibling notes, they could have just added a new file while supporting the old format, but they had some leeway in the format itself: the buttons value only uses three bits. Had they been a little more clever and used a delimited format like S-expressions, they could have simply specified that each mouse event would generate one S-expression, and clients could have read one expression at a time.
- saagarjha 6y agoI guess you could call it a stricter version of the Linux’s kernel’s ABI stability?