Simple: one person adds a feature to one compiler, another adds the same
feature in a different way on another compiler, and now programs written
for one compiler won't compile on the other.

On Fri, Mar 14, 2025, 11:04 Alejandro Colomar <a...@kernel.org> wrote:

> Hi Jim,
>
> On Fri, Mar 14, 2025 at 10:29:42AM -0700, Jim Thompson wrote:
> > I don't think that's the right question. The question is, why add
> something
> > non-standard to the language that's easy enough for anyone who wants it
> to
> > just add as a macro?
>
> It's not that easy.  If you want to make it work for _BitInt() types,
> you'll find that it's actually difficult (and you must call a popcount
> function).
>
> And even for the usual macros that work for fundamental integer types,
> reviewing the code is rather difficult, due to the many casts and
> parentheses involved.  I implemented one of those recently for
> shadow-utils, and the other maintainers were rightfully scared about
> reviewing that code.
>
> > To me people not answering THIS question is what leads
> > to fragmented languages.
>
> Could you clarify how this could lead to a fragmented language?  I think
> it would unify the way people do this common operation, just like
> _Countof() will unify how people get the number of elements of an array.
>
>
> Have a lovely day!
> Alex
>
> --
> <https://www.alejandro-colomar.es/>
>
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to