You are viewing a single thread.
View all comments
5 points

I feel that this is something that would be fixed by writing your test suites first. If you think you have designed a tremendously clever API, but then the code that calls it is an absolute mess, then you have not designed a tremendously clever API.

General principles of restraint and not having to use every available language feature all the time apply here as everywhere - keep it simple, stupid. The only WTF I want when reading your code is, “I didn’t realise there could be such a straightforward way to do it”.

permalink
report
reply
3 points

I had designed a system with what I thought was a good API, wrote the test for it and I was satisfied how simple it was to use the thing but then, when it came to integrate it, it was clunky and no good way to actually use the system.

I don’t think it’s always obvious when an API is good or bad, even with tests.

permalink
report
parent
reply

C++

!cpp@programming.dev

Create post

The center for all discussion and news regarding C++.

Rules

  • Respect instance rules.
  • Don’t be a jerk.
  • Please keep all posts related to C++.

Community stats

  • 149

    Monthly active users

  • 263

    Posts

  • 535

    Comments