[Ffmpeg-devel] Re: FFMPEG code a mess

Gábor Farkas gabor
Mon Sep 19 08:23:03 CEST 2005

Gary Corcoran wrote:
> G?bor Farkas wrote:
>>> Java can be handy sometimes, but there are a few things that annoy me:
>>> - No unsigned types.
>> why do you need them? what would  you like to do with them?
> Do you know how many bugs have been caused by stupid (or just lazy)
> programmers using 'int' to describe things that have no meaning
> when negative, such as a sector number?  And then when the number
> eventually gets large and passes 2^31, suddenly you have a negative
> number of only-positive things.   Ugh...

so you're saying that it's better when it overflows in the data-type?

i mean, yes in the case when the sector number is between 2^31 and 2^32 
it is better.

and what happens when it passes even 2^32?  :)

> IMO things which _cannot_ be negative should *always* be declared
> as an unsigned type.

i agree that if something cannot be negative is represented in a 
program, then you have to make sure it will not ever be negative.

but i'm sure you agree that ONLY by using unsigned data-types, it will 
not make the problem magically solved.

i also agree with what you said in your other email, that interfacing 
binary data types is a pain with java because the lack of unsigned data 

but blaming all the overflow errors on the lack of the unsigned data 
type .... i don't agree with that.

your opinion?


More information about the ffmpeg-devel mailing list