D26128: Simplify defaultValue method: Return Early, Use Default Initialization, and Assert.
Tomaz Canabrava
noreply at phabricator.kde.org
Mon Dec 23 18:30:40 GMT 2019
tcanabrava added a comment.
In D26128#582304 <https://phabricator.kde.org/D26128#582304>, @ervin wrote:
> This also has similarities with D26126 <https://phabricator.kde.org/D26126>, has the same defects and missed opportunities for sharing.
>
> Beside I'm not sure what we're trying to achieve here, those parts of kconfig_compiler are not that bad. I'm not a huge fan of series of "else if" but that's not really making kconfig_compiler hard to understand, the overall lack of consistent domain model and the way the code is generated on the other hand...
This is trying to make the code easier to read. The if chain has more than 60 lines of one liners, this reduces to half and improves readability and maintenance.
It's true that this part of the kconfig_compiler are not that bad, but it's an opportunity to make them better.
I'm also touching the other parts: the model, the domain, the code generation etc.
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D26128
To: tcanabrava, ervin
Cc: ervin, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191223/c9af6c09/attachment.html>
More information about the Kde-frameworks-devel
mailing list