> It's number of characters, not bytes, and it includes the termination -
> I'm inclined to declare like this:
> wchar_t buff[128]={0};
>

After about 17 years since I wrote C/C++ all those sorts of tricks and
traps are just a distant memory.

I spent a few more hours trying to read utf-8 text lines in modern C++ but
there are so many conflicting suggestions and arguments that I haven't even
written a single experiment line of code yet ... I just don't even know
where to start.

In recent weeks I've been watching lots of C++ videos and reading lots of
articles, in the hope that I would learn how to read utf-8 text lines out
of Azure blobs using modern C++, but so far every experiment has failed
utterly. I got one library to list blobs in a container, but any attempts
to read anything by any means out of a blob as a stream fail abysmally.
Another more modern library by Jeffrey Richter and his team looks
promising, but after 4 hours of futile attempts I cannot even get it
compile, let alone try it out.

I've also been reading about all the C++ enhancements added to C++ in 17
and 20, and I'm shocked by what's going on. C++ has turned into "The Blob"
and is absorbing every feature of every other language in existence and
wrapping the mountains of abstractions in more and more abstruse syntax. I
enjoyed writing C++ back in the days when it was "C with classes", but now
it's a monstrosity and only the most skilled developers could possibly
learn to write it correctly.

I think I know what's gone wrong with C++ ... Bjarne and Herb and all their
fanboys are using C++ as a kind of academic playground for computer science
and programming languages. I can't believe that typical C++ developers out
in the real world would possibly need or want the hundreds of features that
the Committee have added to C++ in the last 10 years. And it's not over ...
there are dozens of more complex features being finalised now. "Modules"
will effectively turn C++ into something more like Java and C#. They've
even admitted that C++ syntax is complex so they're inventing ways of
making all the statements more terse, which just takes long complex
statements and turns them into short complex statements. Eventually C++
will finish-up like Haskell or APL. It's nuts.

Sunday rant over -- *Greg*

Reply via email to