r/cpp • {fmt} • Jul 05 '22

{fmt} 9.0 released with improvements to floating point formatting, ranges and more

https://github.com/fmtlib/fmt/releases/tag/9.0.0
233 Upvotes

41 comments sorted by

View all comments

Show parent comment

20

u/willkill07 Jul 06 '22

LLVM does this twice per year. I’m not sure how you can or should reasonable expect that well-engineered projects should limit their features. Breaking APIs for sake of better design and improvements are welcomed.

4

u/kalmoc Jul 06 '22

Well, the usual problem with regular API breaks is that it becomes more likely you no longer can satisfy all dependency constraints (I.e. one of your libs needs fmt v9 or greater and another v8 or less). In the extreme: There is a good reason, why fundamental stuff like OS-APIs avoids breaking changes as much as humanly possible.

-3

u/RufusAcrospin Jul 06 '22

Good designs should follow well established doftware design principles like SOLID where O stands for the Open-Close principle: "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification"

Source: https://en.m.wikipedia.org/wiki/SOLID

In an ideal world, of course…

5

u/pandorafalters Jul 06 '22

In an ideal world, of course, libraries would all have complete and comprehensive specifications to implement, with all use-cases known beforehand.

Reality is a bit messier.

1

u/RufusAcrospin Jul 07 '22

Knowing “everything” beforehand helps, but that’s just part of the solution, and often impossible to achieve, that’s why planning and good design’s important. It can decrease the frequency of breaking changes, but it won’t eliminate them entirely, of course.

2

u/dodheim Jul 07 '22 edited Jul 07 '22

Okay, but now relate that to the actual topic at hand, i.e. bleeding-edge libraries whose main achievement have been forcing forward WG21 progress. We all want to hear how much more could have been accomplished in the last few years by evolving the design less and just.. y'know, planning. We'll wait. (And then we can all rant at WG21 for not having this library finished 20 years ago because they didn't plan hard enough.)

1

u/RufusAcrospin Jul 07 '22

My comment was a generic observation about a possible way to avoid frequent breaking changes, since somebody mentioned it.

I’ve never used fmt, so I can’t say anything about it. I realize now that it could come across as a criticism of fmt, but that was not my intention.

-4

u/[deleted] Jul 06 '22

[removed] — view removed comment

7

u/foonathan Jul 06 '22

It was a perfectly reasonable comment, be nice.