They could produce something that looks like Qt, OWL/VCL, or nowadays .NET like but in C++.
Instead they produce libraries where one is forced to use C low level details, mixed with Win32 and COM pointer handling and casts everywhere, not even MFC escapes it.
Not to count how many interactions of COM smart pointers that have come up with since COM exists.
C++/CX looked like they finally learned their way and would offer something similar to C++ Builder, but no that wasn't meant for us to enjoy it.
So now anyone doing UWP with C++, gets to manually edit IDL files without tooling support, and merge the generated files manually.
I really don't get their macho developer culture.
In retrospect, do you feel it was it a bad idea to not use a heavier abstraction?
It was a bad idea versus what other compiler vendors had in their toolbox.
MFC only won because Microsoft is the OS vendor, and Borland lost it trying to fly too high.
Back in the MS-DOS and Windows 3.x very few would use Microsoft compilers, Borland and Watcom were the favourite.
I'm inclined to not recognize that as a distinct culture and rather call it an infectious habit. Auditable, maintainable code is a skill, after all.
let ch = if index < strlen then str.charAt(index) else 0
Eminently readable and less boring than long if/else chains in Python.On a side note, having gotten used to newer languages, an option type sure is a nice thing.
>>> foo = 10
>>> bar = foo if foo > 5 else 0
>>> bar
10
>>> bar = foo if foo < 5 else 0
>>> bar
0"for ch in index:"
reads pretty cleanly to me.
Code should be written for humans.