[...]
>>If you want to start a discussion about some topic, post something. If
>>all you can manage is to add random stuff to something that's not
>>related to it, don't 'whine' about being told that this was pretty
>>useless.
>
> Its not random and its not my fault if you're too thick to see the connection.
> But instead of just ignoring it you put your ignorance on display for all.
> Congratulations.
People being very convinced that something which doesn't exist must be
there nevertheless isn't an uncommon occurence. Especially in software
development, cf Kees Cooks witchhunt for the mass of accidentally
forgotten breaks in the Linux source which didn't exist but he
nevertheless dutifully found.
>>> An array containing a few escape codes then just using printf() instead of
>>> juggling curses specific API calls is IMO a lot simpler from a coding POV
>>> as well as being faster.
>>
>>So far, I've written one program using curses and something like
>>
>>static void curses_start(int c)
>>{
>> int attr, color;
>>
>> attr = A_BOLD;
>>
>> switch (c) {
>> case CHR_PROBLEM:
>> color = CP_PROBLEM;
>> break;
>>
>> case CHR_PROGRESS:
>> color = CP_PROGRESS;
>> break;
>>
>> case CHR_FINE:
>> attr = A_NORMAL;
>> color = CP_FINE;
>> }
>>
>> attr_set(attr, color, NULL);
>>}
>>
>>is vastly easier to understand and work with than the equivalent 'machine
>>code' (which terminal control escape sequences are).
>
> Thats your opinion, plenty of others may differ. However using escape codes
> I can change colours and effects multiple times in a single printf but with
> curses it would be god knows how many API calls to do the same thing.
One for each change plus setting up the colour pairs. And it cleanly
separates the actual output from binary gibberish (as viewed from a
human perspective) which just exists because it's an artefact of some
machine.
>>"Being faster" is still a non-point. If it was fast enough on VAXen or
>>25Mhz PCs - and it was - it's going to be much more than 'fast enough'
>>on the hardware of today.
>
> Any decent programmer cares about efficiency.
A decent programmer would use an argument here instead of a general
platitude referring to the person who posted an opinion. That's because
decent programmer would have to be decent logicans instead of innuendo
experts.
Yesterday, I did a C/ XS implementation of some 'inner loop'-routine of
a certain program. Depending on the use-case, this sped it up by a
factor of 2.2 or 2.7. However, in absolute terms, this comes down to
saving about 5E-7 seconds of running time per invocation. I'm going to
keep it because I have it now but hindsight, this likely wasn't really
worth the effort.