Re: [boost] critical bugs in charconv
So what's your point?
Another example. I had asked for a TypeTrait is_integer and also supplied code for it (https://github.com/boostorg/type_traits/issues/186). The point is that is_integer only returns integer (no character, no bool). John immediately closed my request "We are not responsible for that". Instead of admitting a mistake (of course I make some myself) and saying "we forgot/didn't think of it, we'll do it", the only answer is "we don't care". That's thinking from the wallpaper to the wall. As I said, boost used to be progressive, but now when you make a suggestion, all you get is "We're not responsible for that/we're not interested in that/we might have to change something that's not possible" And this even with such a simple TypeTrait. Single file. No dependencies. And on the other hand, libraries with the most severe buffer overflows (charchonv) are included, where obviously no tests are carried out at all.
Another example. I had asked for a TypeTrait is_integer and also supplied code for it (https://github.com/boostorg/type_traits/issues/186). The point is that is_integer only returns integer (no character, no bool). John immediately closed my request "We are not responsible for that".
His response was certainly more nuanced than that. Users are allowed to overload Boost.TypeTraits without it being UB like adding additional overloads in namespace std.
Instead of admitting a mistake (of course I make some myself) and saying "we forgot/didn't think of it, we'll do it", the only answer is "we don't care". That's thinking from the wallpaper to the wall. As I said, boost used to be progressive, but now when you make a suggestion, all you get is "We're not responsible for that/we're not interested in that/we might have to change something that's not possible"
Again, every-time we do not incorporate your suggestions we try and provide you with valid reasoning. Many of the libraries can't advance their language standard because 1 user says so. Since your other emails have been vocal about the supposed deficiencies in Math we don't like to make change for the sake of change. Math is at C++14, and will remain that way for the foreseeable future because that's what our large consumers use.
And this even with such a simple TypeTrait. Single file. No dependencies. And on the other hand, libraries with the most severe buffer overflows (charchonv) are included, where obviously no tests are carried out at all.
On 05.02.24 02:02, g.peterhoff--- via Boost wrote:
So what's your point?
Another example. I had asked for a TypeTrait is_integer and also supplied code for it (https://github.com/boostorg/type_traits/issues/186). The point is that is_integer only returns integer (no character, no bool). John immediately closed my request "We are not responsible for that".
I wouldn't have accepted this is_integer either, because its definition of "integer" is flawed in two respects: - It excludes integer types that don't have an intX_t alias. For example, int and long are commonly both 32 bits, but only one of them gets the int32_t alias. Or if long is 64 bit, then it commonly shares as size with long long. - Contrary to your description, it includes some character types because int8_t and uint8_t are usually aliases for (signed) char and (unsigned) char. If you had called it has_fixed_size_int_t_alias, it would at least be named correctly - but I would still need to see an argument that it is actually useful. -- Rainer Deyke (rainerd@eldwood.com)
On 05/02/2024 01:02, g.peterhoff--- via Boost wrote:
So what's your point? Another example. I had asked for a TypeTrait is_integer and also supplied code for it (https://github.com/boostorg/type_traits/issues/186). The point is that is_integer only returns integer (no character, no bool). John immediately closed my request "We are not responsible for that".
Instead of admitting a mistake (of course I make some myself) and saying "we forgot/didn't think of it, we'll do it", the only answer is "we don't care". That's thinking from the wallpaper to the wall. As I said, boost used to be progressive, but now when you make a suggestion, all you get is "We're not responsible for that/we're not interested in that/we might have to change something that's not possible"
And this even with such a simple TypeTrait. Single file. No dependencies. And on the other hand, libraries with the most severe buffer overflows (charchonv) are included, where obviously no tests are carried out at all.
Please don't think we don't care, however, please be aware that there are quite literally an infinite number of traits which *could* be added if we were so inclined. Very early on the bar was set quite high, and the scope relatively narrow to keep things under control. Plus your requirements for is_X may not be the same as my requirements for is_X. Your is_integer is a good case in point - character types as in [un]signed char most definitely are integers and are used as such for [u]int8_t. I'm also tempted to suggest that numeric_limits is a better fit for your needs, given that that deals with semantics (behaves like a number) rather than types (type_traits). If anyone would like to comment on the other issues g.peterhoff has raised, second opinions are always most welcome: https://github.com/boostorg/type_traits/issues/185 https://github.com/boostorg/type_traits/issues/186 https://github.com/boostorg/type_traits/issues/187 https://github.com/boostorg/type_traits/issues/188 https://github.com/boostorg/type_traits/issues/189 https://github.com/boostorg/type_traits/issues/190 https://github.com/boostorg/type_traits/issues/191 https://github.com/boostorg/type_traits/issues/192 https://github.com/boostorg/type_traits/issues/193 https://github.com/boostorg/type_traits/issues/194 Aside number 1: it is probably long overdue for someone (but not me) to submit a "type_traits 2" which is something like C++17 or later, and much thinner and simpler than the old type_traits. Aside number 2: There is probably also scope for a semantic traits library, ie does a type have all the semantics of an integer/float/bool or whatever. Although whether that's better handled with concepts post-C++20 is a whole other topic. Best, John.
John Maddock wrote:
If anyone would like to comment on the other issues g.peterhoff has raised, second opinions are always most welcome:
https://github.com/boostorg/type_traits/issues/185 https://github.com/boostorg/type_traits/issues/186 https://github.com/boostorg/type_traits/issues/187 https://github.com/boostorg/type_traits/issues/188 https://github.com/boostorg/type_traits/issues/189 https://github.com/boostorg/type_traits/issues/190 https://github.com/boostorg/type_traits/issues/191 https://github.com/boostorg/type_traits/issues/192 https://github.com/boostorg/type_traits/issues/193 https://github.com/boostorg/type_traits/issues/194
Since integral types are actually a compound category in the standard, "The character types, bool, the signed and unsigned integer types, and cv-qualified versions ([basic.type.qualifier]) thereof, are collectively termed integral types." I think there is justification for providing the separate categories for signed integer (https://eel.is/c++draft/basic.fundamental#1), unsigned integer (https://eel.is/c++draft/basic.fundamental#2), character (https://eel.is/c++draft/basic.fundamental#11) and, for completeness, bool. There exist uses for each of the above categories. E.g. countl_zero requires an unsigned integer type; Endian requires "an integral type that is not bool"; and functions that want to take C strings need to be constrained on a character type.
Since integral types are actually a compound category in the standard,
"The character types, bool, the signed and unsigned integer types, and cv-qualified versions ([basic.type.qualifier]) thereof, are collectively termed integral types." Sure, and we have is_integral for that. I think there is justification for providing the separate categories for signed integer (https://eel.is/c++draft/basic.fundamental#1), unsigned integer (https://eel.is/c++draft/basic.fundamental#2), character (https://eel.is/c++draft/basic.fundamental#11) and, for completeness, bool.
I have no great objection to that, though it will have to wait until I have some spare time, unless someone wants to submit a PR sooner. Best, John.
participants (5)
-
g.peterhoff@t-online.de
-
John Maddock
-
Matt Borland
-
Peter Dimov
-
Rainer Deyke