tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: setsockopt() compat issue



Christos Zoulas wrote:
In article <20081019004609.GA10211%netbsd.org@localhost>,
David Holland  <dholland-tech%netbsd.org@localhost> wrote:
On Sat, Oct 18, 2008 at 05:53:22PM -0400, Greg A. Woods; Planix, Inc. wrote:
I think most of those arguments given in that paper are almost as completely bogus, and are clearly ignorant of the various elephants in their room, as the (sadly similar) arguments which created the massive and unnecessary bogosity which came out of the Large File Summit.

I think in reality ILP64, or perhaps S32ILP64, has clearly been shown to work just as well for at least some relevant hardware architectures.

A better argument as to why NetBSD uses I32LP64 on those architectures where ILP64 might make more sense would be to say that it was simply easier to follow the herd than to try to ride against them all no matter how bogus were the arguments used by the herd to choose their direction.
I don't understand the point of your argument. What *purpose* is
served by making "int" 64 bits wide? What problem are you trying to
solve?

The only thing that having int 64 bits solves is programs that assume
sizeof(int) == sizeof(long) keep working, while making life more difficult
in general because you are not going to have a primitive type for 16 or
32 bit numbers.

Huh? What happened to short now?

Also, don't C99 actually mandate that [u]int{8|16|32|64}_t should be defined.

Programmers who actually rely on a int being 32 bits are idiots (sorry if I offend someone, but it's a fact) and should be shot. We had this same problems 20 years ago when ints usually actually were 16 bits, and 32 bit machines started becoming popular. Loads of software broke because they made these kind of assumptions. One would hope that we've actually learned something since then, and that the lesson isn't that int's should be redefined as a fixed size, but that programs shouldn't use them unless they mostly care about efficiency and know that the values they play with are small enough to be safe.

        Johnny


Home | Main Index | Thread Index | Old Index