[Libwebsockets] spelling of “writeable”
andy at warmcat.com
Mon Jun 21 07:29:11 CEST 2021
On 6/21/21 12:27 AM, Felipe Gasper wrote:
> I’ve noticed that the spelling of “writeable” is inconsistent in the LWS API:
> - lws_callback_on_writable
> - LWS_CALLBACK_CLIENT_WRITEABLE
I also noticed this about ten years ago... "writable" is
dictionary-correct but somehow for the actual event, WRITE-ABLE aligns
better to my mental model of what is happening there.
> Andy, would you accept a PR that adds macros to allow either spelling for such names as these?
Rather than allow either anywhere, if we will address it, we should
enable people to just use "writable", so then only one (correct) thing
In the past what has worked well for fixing this kind of thing is
mass-update the actual definitions and examples to the new way, and
provide #define old new for each modified instance in the related
headers. That is a bit tricky since you have to find the old uses to
prepare the #defines, before mass search-replace that must not wreck the
new #defines that include the search string.
People refer to the headers and examples to discover what to do, they
will find the cleaned version and start to use that more over time,
while no disruption for existing users (nor would the old way ever be
deprecated for this).
More information about the Libwebsockets