Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

moron blags about C

Name: Anonymous 2010-09-14 15:31

http://james-iry.blogspot.com/2010/09/moron-why-c-is-not-assembly.html
There are some very assembly like things about C and its worth mentioning them. The main one is that C gives you very, very good control over the layout of data structures in memory.
Haha, oh wow!

Name: Anonymous 2010-09-14 15:34

He's absolutely correct about his main point, C is not a portable assembly

Name: Anonymous 2010-09-14 15:34

Go away, James.

Name: Anonymous 2010-09-14 15:47

>>2
Yes, but he makes a bunch of mistakes typical of god damn idiots who never bothered to learn C properly. SO FUCK HIS ANUS!

Name: Anonymous 2010-09-14 16:10

Next in the news: C is a high level language!

Name: Anonymous 2010-09-14 16:31

>>4
I'm afraid it's you who never bothered to learn C properly (which means reading the standard, mind you).

Name: Anonymous 2010-09-14 17:03

Well, this was a waste of time. He makes some subtle mistakes, but nothing even worth pointing out. elliott cable this guy isn't.
>>1-chan, don't make any more threads if this is what you're going to post.

Name: Anonymous 2010-09-14 17:07

elliott cable this guy isn't.

sounds like a compliment to me

Name: Anonymous 2010-09-14 17:13

>>8
It is. The suggestion was that this blog post isn't nearly bad enough to warrant a thread.

Name: Anonymous 2010-09-14 18:35

No true C programmer would write a blog that looked like that.. and they probably wouldn't write a blog at all.

Name: Anonymous 2010-09-14 19:38

>>10
No true programmer would write a blog at all.

Name: Anonymous 2010-09-14 19:47

>>11
Yes, my blog is all procedurally generated

Name: Anonymous 2010-09-14 20:04

The C standard says a bunch of stuff leads to undefined behavior. Real compilers take advantage of that to optimize away code, sometimes with surprising results.
I love it when my compiler silently does the wrong thing! This is why C and C++ are the best programming languages.

Name: Anonymous 2010-09-14 20:17

>>13
I love it when my compiler silently does the right thing!
FTFY.

Name: Anonymous 2010-09-14 20:22

>>14
I do love it when compilers do the right thing. Which is why I don't use C++ and avoid C unless it is the only practical choice.

Name: Anonymous 2010-09-15 0:35

>>15
You avoid C because of undefined behaviour?

Name: Anonymous 2010-09-15 9:25

Consider this bit packing struct:

    struct eeh_type
    {
            uint16 size:          10;   /* 10 bits */
            uint16 code:           6;   /* 6 bits */
    };

Depending on which C compiler, and which "endian" flavor of machine you are on, this might actually be implemented as

<10-bits><6-bits>

or as

<6-bits><10-bits>

Also, again depending on the C compiler, machine architecture, and various mysterious preference settings, the items might be aligned to the nearest 8, 16, 32, or 64 bits.

So what matters? If you are trying to match bits with a real world file, everything!

Name: Anonymous 2010-09-15 12:25

>>17
Shouldn't things like that be done in inline asm anyway?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List