|
Boost : |
Subject: Re: [boost] [gui] Help with a little experiment.
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2011-06-21 04:29:12
On 21.06.2011 10:14, Artyom Beilis wrote:
>
> Especially this one:
>
> An API is intuitive if a semi-experienced user
> gets away without reading the documentation,
> and if a programmer who doesnât know the API
> can understand code written using it.
>
>
> IMHO The proposed API does not helps with all this
> and makes things very obscure for a programmer that is
> not fully familiar with the toolkit.
>
> If I show this code to average C++ programmer the
> vast majority of them would not know what happens there...
>
> The fact that you and 1 percentile
> of C++ programmers (that write Boost Libraries)
> understand the proposed code
> does not mean it is understandable to other.
But that's a general issue of C++ DSELs, not something new to this
library. It is all about the expectations - most C++ programmers don't
expect code that isn't imperative to do anything. Once you get over that
misconception, I find that well-designed DSELs are very easy to read.
That said, the original snippet is not well-designed IMO. The one that
uses [] to delineate the contents of a widget is far better.
Sebastian
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk