lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jul 5, 2017 at 11:03 AM, Viacheslav Usov <via.usov@gmail.com> wrote:
> On Wed, Jul 5, 2017 at 2:29 PM, Coda Highland <chighland@gmail.com> wrote:
>
>> You have now: I like it.
>
> That's different from "has not attempted to avoid it".

I haven't attempted to avoid it; I've implemented similar APIs (minus
the ugly parts) in my own code.

>> And in fact I think the community of developers that likes it is larger
>> than you imagine, because Qt [...]
>
> Please do not get me started on Qt :)

Notwithstanding its behaviors as a GUI toolkit, and discounting the
build/metaprogramming tooling, is there something fundamentally wrong
with its approach to the C++ language?

>> The reason people go for printf instead of iostreams is that format
>> strings are a lot easier to use when you need to do formatting, because the
>> STL's formatting tools are blah.
>
> That's not the only reason. There are for sure deeper reasons than just the
> arrowishness, yet I find it likely that the arrow fantasy that underlines it
> implied other design choices.

It's not the arrowishness, it's the awful awful API on the format
traits. iostream makes a lot of operations simpler and safer, but even
something as simple as outputting a table with fixed-width columns is
stupidly verbose and the API names aren't all intuitive -- a strange
mishmash of abbreviations and fully spelled-out words. The language
now supports a typesafe printf-alike (and I've seen multiple
implementations of such, including Qt's) but STL is stuck with this
dinosaur that started with a good idea and then bolted on one of the
ugliest libraries I've ever worked with on top of it.

/s/ Adam