In a thread about printing UInt variables, Milan Bouchet-Valat said:
> The point is, in Julia using unsigned ints to store values that should
> always be positive is *not* recommended. 
If that is true, then shouldn't the type be called Byte? It seems the
type has been misnamed if it was never intended to store unsigned integers.

Further, calling the type UInt is misleading to devs from C lang family
who frequently depend on compile-time type checking (ex. int vs. uint)
to help ensure no unexpected signs show up. I am not suggesting
type-checking is a perfect defense against sign errors, and thorough
runtime testing is definitely necessary. In my larger projects combining
type checking and runtime tests is almost a practical necessity and can
seriously cut down on time spent bug hunting sign errors.

That said, I am guessing the suggested solution in Julia is to rely
solely on runtime sign checking? I can't see how I could make that
practical for my use cases, but it would be good to know if that is what
the Julia devs intend.

Thanks!

Jesse

Reply via email to