On 9/27/2021 11:56 PM, Lex Trotman wrote:
> On Tue, 28 Sept 2021 at 14:27, Mitchell <
li...@triplequasar.com> wrote:
>> Hi,
>>
>> On Mon, 27 Sep 2021 13:05:18 -0700 (PDT)
>> "'seasoned_geek' via scintilla-interest" <
scintilla...@googlegroups.com> wrote:
>>
>>> Thanks for the reply Mitchell. Can I ask a follow up stupid question?
>>>
>>> Was this a conscious decision or did it "just happen?" It could have been
>>> some conscious decision to not add a std::string stdENName to the KeyMap
>>> class. Not wanting every other language to demand their own entry for you
>>> to maintain.
>> I cannot speak for Neil, but I suspect it was out of scope. The SCI_* constants are how clients use Scintilla, so string representations are meaningless in that context.
> IIUC Scintilla started out having a similar API to what was then a
> standard Windows editing component, which used the enum constants to
> interface as Mitchell said. As no strings were used in its interface
> there was no point in generating them.
>
> Different language bindings use different methods to map the constants
> to language components, and even if they use strings they are likely
> to use the language implementation of a string, and the language
> implementation of a map similar to that you mentioned, so its unlikely
> that they would benefit from a table of C++ strings.
Thanks. I'm not thinking about this from an API level. I'm thinking
about this from the perspective of programmers becoming lazy at
convenient times and some level of consistency in final products.
When one is adding a key mapping override dialog it's rather easy in
most UI libraries that I've used over the years to just loop through a
map dynamically building the dialog. No knowledge about the mappings is
then required. For the English language editors Scintilla can add/remove
key mappings at will without it cascading out. Those who have
translations would need to catch the additions, but they wouldn't have
to make much in the way of coding changes. (Yes, the KeyMap is probably
pretty stable by now.)
Perhaps I've just hit the cranky old man stage of life and nothing will
ever make me happy again so I have to focus on making things less
annoying. Depending on which project at which client site I have to use
the given project editor. I don't even know if they all use Scintilla
and it isn't worth researching. I just get tired of the mystery word
search when configuring each of them.
Erase Line
Delete Line
Rub Line
Expunge Line
Clear Line (I think one of them just had clear and you had to use it to
figure out what it did)
Nuke Line
etc.
Providing "standard" text names for the KeyMap could help with
consistency given developers tend to be lazy on personal projects when
working on the "non-cool" code.
Just my 0.0002 cents.