tech-kern archive

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

Re: UVM typedef struct



On Mon, Aug 10, 2009 at 05:45:54PM -0700, Jason Thorpe wrote:
>
> On Jun 16, 2009, at 12:02 PM, Antti Kantee wrote:
>
>> The underlying problem is that I do not see any benefit from arbitrary
>> typedefs such as struct x -> x_t.  Will we get u32_t next?
>
> No, the real benefit is "x * -> x_t".

That is not a benefit. What does it buy you? Absolutely nothing. What
does it cost you? A lot of clarity. It invites memory leaks, refcount
bugs, accidental sharing of things you meant to have your own copy of,
sometimes accidental copying of things you meant to share, and worse,
all because you're wilfully and gratuitously blurring the distinction
between a value and a pointer to a value.

If you want to think in Java it's your lookout but please don't force
it down everyone else's throat.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index