[BRLTTY] Low-level BrlAPI questions

Dave Mielke Dave at mielke.cc
Thu Apr 15 06:33:10 EDT 2021


[quoted lines by Aura Kelloniemi on 2021/04/15 at 13:19 +0300]

> > I do not really see the use of being able to pass different sizes.
> > That's most probably a sign of a bug in the application output preparing
> > code, which the programmer would rather want to catch.
>
>You are probably right. The only case where the programmer may not care about
>the size of the output is when they want to just send some text on the
>display, and hope that it fits. For example brltty-ttb and apitest work this
>way in some situations.

I disagree, but maybe not for an obvious reason. The fact is that bindings like Tcl, Java, Python (and maybe Rust) have arrays, sequences, or whatever. These things are constructed and have a size. This is a common case - the fact that C lacks this is the exception. That's one big reason why I think the write arguments should include optional sizes for the masks. Then the bindings could just set those fields and let some well-defined, common handling take place underneath.

-- 
I believe the Bible to be the very Word of God: http://Mielke.cc/bible/
Dave Mielke            | 2213 Fox Crescent | WebHome: http://Mielke.cc/
EMail: Dave at Mielke.cc  | Ottawa, Ontario   | Twitter: @Dave_Mielke
Phone: +1 613 726 0014 | Canada  K2A 1H7   |


More information about the BRLTTY mailing list