Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Unsinged types

Reply
Thread Tools

Unsinged types

 
 
John Bode
Guest
Posts: n/a
 
      07-23-2012
On Friday, July 2, 2010 8:34:10 PM UTC-5, Gene wrote:
> On Jul 2, 4:45*pm, Jase Schick <n...@spam.invalid> wrote:
> > Hi Does C still need unsigned types? Java manages perfectly well without
> > them. Do many people ever use unsigned types nowadays and if so why?In a
> > 64-bit world, the extra range is rarely worth the hastle it seems tome.
> >
> > Jase
>
> Yes. If you write code close to hardware like graphics and network
> protocol stuff, the lack of unsigned types quickly becomes _the_ most
> annoying thing about Java. It was hubris for the Java language
> designers to leave them out. A trivial example is that the 4 bytes in
> a RGBA pixel each represent a quantity in [0..255] When you e.g. read
> back a frame buffer, you must play stupid, inefficient tricks to do
> useful computations with the data.




On Friday, July 2, 2010 8:34:10 PM UTC-5, Gene wrote:
> On Jul 2, 4:45*pm, Jase Schick <n...@spam.invalid> wrote:
> > Hi Does C still need unsigned types? Java manages perfectly well without
> > them. Do many people ever use unsigned types nowadays and if so why?In a
> > 64-bit world, the extra range is rarely worth the hastle it seems tome.
> >
> > Jase
>
> Yes. If you write code close to hardware like graphics and network
> protocol stuff, the lack of unsigned types quickly becomes _the_ most
> annoying thing about Java. It was hubris for the Java language
> designers to leave them out. A trivial example is that the 4 bytes in
> a RGBA pixel each represent a quantity in [0..255] When you e.g. read
> back a frame buffer, you must play stupid, inefficient tricks to do
> useful computations with the data.




On Friday, July 2, 2010 8:34:10 PM UTC-5, Gene wrote:
> On Jul 2, 4:45*pm, Jase Schick <n...@spam.invalid> wrote:
> > Hi Does C still need unsigned types? Java manages perfectly well without
> > them. Do many people ever use unsigned types nowadays and if so why?In a
> > 64-bit world, the extra range is rarely worth the hastle it seems tome.
> >
> > Jase
>
> Yes. If you write code close to hardware like graphics and network
> protocol stuff, the lack of unsigned types quickly becomes _the_ most
> annoying thing about Java. It was hubris for the Java language
> designers to leave them out. A trivial example is that the 4 bytes in
> a RGBA pixel each represent a quantity in [0..255] When you e.g. read
> back a frame buffer, you must play stupid, inefficient tricks to do
> useful computations with the data.




On Friday, July 2, 2010 8:34:10 PM UTC-5, Gene wrote:
> On Jul 2, 4:45*pm, Jase Schick <n...@spam.invalid> wrote:
> > Hi Does C still need unsigned types? Java manages perfectly well without
> > them. Do many people ever use unsigned types nowadays and if so why?In a
> > 64-bit world, the extra range is rarely worth the hastle it seems tome.
> >
> > Jase
>
> Yes. If you write code close to hardware like graphics and network
> protocol stuff, the lack of unsigned types quickly becomes _the_ most
> annoying thing about Java. It was hubris for the Java language
> designers to leave them out. A trivial example is that the 4 bytes in
> a RGBA pixel each represent a quantity in [0..255] When you e.g. read
> back a frame buffer, you must play stupid, inefficient tricks to do
> useful computations with the data.


 
Reply With Quote
 
 
 
 
John Bode
Guest
Posts: n/a
 
      07-23-2012
On Friday, July 2, 2010 8:34:10 PM UTC-5, Gene wrote:
> On Jul 2, 4:45*pm, Jase Schick <n...@spam.invalid> wrote:
> > Hi Does C still need unsigned types? Java manages perfectly well without
> > them. Do many people ever use unsigned types nowadays and if so why?In a
> > 64-bit world, the extra range is rarely worth the hastle it seems tome.
> >
> > Jase
>
> Yes. If you write code close to hardware like graphics and network
> protocol stuff, the lack of unsigned types quickly becomes _the_ most
> annoying thing about Java. It was hubris for the Java language
> designers to leave them out. A trivial example is that the 4 bytes in
> a RGBA pixel each represent a quantity in [0..255] When you e.g. read
> back a frame buffer, you must play stupid, inefficient tricks to do
> useful computations with the data.


Had to play with some geospatial data files (DTED) last year; not having anunsigned data type made the job *much* more annoying than it needed to be,especially when I was trying to display the bitmap. Lots of casts, lots of conversions that wouldn't have been necessary if I'd had an unsigned typeavailable.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unsinged types Jase Schick C Programming 35 09-07-2012 06:34 PM
Comparing singed to unsinged warning Nevil Lesdog C Programming 7 08-24-2007 01:45 AM
writing binary data whose size exceeds unsinged it mohammad.nabil.h@gmail.com C Programming 14 01-28-2006 12:18 PM
warning - comparing a signed value to an unsinged value Kevin Goodsell C Programming 30 10-22-2003 12:12 PM
Unsinged char to int Joseph Suprenant C Programming 2 08-18-2003 04:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57