C sucks (RANT ALERT)

For everything that's not in any way related to PureBasic. General chat etc...
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Code: Select all

C++;  // Makes C bigger and returns the original value!
#NULL
Addict
Addict
Posts: 1497
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Post by #NULL »

:lol: :lol: :lol:
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

:D
Dare2 cut down to size
dell_jockey
Enthusiast
Enthusiast
Posts: 767
Joined: Sat Jan 24, 2004 6:56 pm

Re: C sucks (RANT ALERT)

Post by dell_jockey »

Trond wrote: And WHICH IDIOT made a SYSTEM programming language WITHOUT putting the BIT SIZES of the standard types into the standard? A valid 32-bit C compiler for x86 can, while following the standard, have an 8-bit int and a 64-bit long long (as long as a short and char is no more than 8 bits either). Only conventions keeps the programs running, not the standard.

Well, actually, the idiot you are referring to, Trond, is a guy that made sure that C is as portable as it is.
By not defining bit sizes of 'standard types' à priori, but putting the definition in header files - and employing a lot of other techniques like this one - a C compiler is portable across a remarkable range of architectures, be it from small 8-bit microprocessors, old VAX / PDP architectures, contemporary Intel stuff or all the way up to the Cray league...
cheers,
dell_jockey
________
http://blog.forex-trading-ideas.com
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: C sucks (RANT ALERT)

Post by Trond »

dell_jockey wrote:
Trond wrote: And WHICH IDIOT made a SYSTEM programming language WITHOUT putting the BIT SIZES of the standard types into the standard? A valid 32-bit C compiler for x86 can, while following the standard, have an 8-bit int and a 64-bit long long (as long as a short and char is no more than 8 bits either). Only conventions keeps the programs running, not the standard.

Well, actually, the idiot you are referring to, Trond, is a guy that made sure that C is as portable as it is.
By not defining bit sizes of 'standard types' à priori, but putting the definition in header files - and employing a lot of other techniques like this one - a C compiler is portable across a remarkable range of architectures, be it from small 8-bit microprocessors, old VAX / PDP architectures, contemporary Intel stuff or all the way up to the Cray league...
That's not true. It would be possible to define sizes for different architectures. Also, it would be possible to have defined sizes for some types and then have a generic type that matches the processor native size.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

C's (or C++'s) problem is the same as linux's problem. Every man and woman and their dog took the basics and made it their own. Watch K&R weep over the grave of portability.
Dare2 cut down to size
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

What about Visual Basic. :roll:

Show me something in C that's worse than a twip.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Visual Basic rocks for what it can do.
Post Reply