Sounds about right to me. C/C++ never did decide whether the language had a
nominative type system or not.

Last night I wrote some C++. It complained that I didn't have an overload
for int, so I added one. Later in an almost identical situation, I added
one for int and it complained that there was then an ambiguity with the
overload for long, const char * and some other type that wasn't even
related in my opinion. There's seemingly no way to know when it will
complain because you didn't overload for both int and long, and when it it
will complain that you did.

I then had a function f which I overloaded for mp_limb_t, which I made
explicit so it wouldn't convert from other types automatically. It
completely ignored that and told me that it didn't know if f((unsigned
long) a) was meant to be a call to f(long) or f(int). I mean, WTF. This
language is just idiotic. I fixed the problem by removing the overload for
int, which was obviously easily confused with an unsigned long!

I think GMP recently did away with their old C++ header and replaced it
with something easier to maintain (no idea about the details, I'm guessing
based on the little I've seen).

I guess ridding the earth of C++ is not one of the possible solutions open
to us?

Bill.


On 8 April 2014 01:40, Brian Gladman <b...@gladman.plus.com> wrote:

> On 07/04/2014 23:02, Bill Hart wrote:
> > Argh, I hate C++. What a useless language.
>
> When we attempt to overload (u)intmax_t types, won't we inevitably be
> duplicating overloads of either long or long long types?
>
> I am no expert on C++ overloading but aren't overloads on type aliases
> illegal?
>
>    Brian
>
> --
> You received this message because you are subscribed to the Google Groups
> "mpir-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mpir-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to mpir-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/mpir-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to