Nat! bio photo


Senior Mull.

Twitter RSS


void * and & and C lameness

I don't know who specified it, but that you can't use & on pointers is a major lameness in C. Especially with addresses you want to mask off bits, and you now always have to cast to an integer and then back again. The problem is though, which integer ? Traditionally on UNIX one used int, but that f.e. never worked well on the Atari ST f.e., where int was defined on some compilers to be 16 bit. With the advent of 64 bit computing, it remains to be seen if all compilers will promote long to 64 bit, so logically one should be using unsigned long long, but that is just horrible :) One reason, why you may not be able to use & on pointers, might be because you couldn't use AND on address registers on some CPUs like the 680000. but then C was developed for the PDP-11 and I don't know that machine at all. It is also none none none convenient, that you can't say (void *) p + 12. I suspect some PASCALers were on the committee when this was discussed. :) [Playing right now: Gasoline from the album "Audioslave" by Audioslave]


A photo of poop

From: poop

first post!

A photo of java roxx

From: java roxx

Try Java instead! It makes live so much easier without its distinct notion of pointers (although it's full of them all the time - just as in java.lang.NullPointerException, my favourite). I think Java was especially designed for such whiners as you. :-)

A photo of Anonymous Coward

From: Anonymous Coward

Well, and HOW does *that* relate to XUL ?? Fix your arguments ! JavaScript doesn't even know about that "long long" thing or what that junk is you are talking about. How the hell are you addressing the thing you are calling "address register" in XML ??? And AFAIK Mozilla does not even run on PDP-11 anyway.


PS: Everybody knows that Amiga was far superior to Atari ! So who wonders that it can't even deal with JavaScript !

A photo of zealot

From: zealot

Yeah, AmigaOS4 will be definitely crushing! Who remembers Atari anyways?

A photo of Nat!

From: Nat!

Ugh, I left comments on.

Sorta like forgetting to turn off the light in a room with the window open on a warm summer night. You come back and find out you've become infested. :)

A photo of C64

From: C64

just 2 things:

- what's an 680000 CPU? 10 68000's clustered?

- it you want to abbreviate 'for example', please please please use 'e.g.' (latin for exempli gratia"), not 'f.e.'

Post a comment

All comments are held for moderation; basic HTML formatting accepted.

E-mail: (not published)