[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

This is perfectly fine in C #define QUEUE_NEXT(q) (*(QUEUE

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 2

File: 1471743416857.jpg (60KB, 500x600px) Image search: [Google]
1471743416857.jpg
60KB, 500x600px
This is perfectly fine in C

#define QUEUE_NEXT(q)       (*(QUEUE **) &((*(q))[0]))
#define QUEUE_PREV(q) (*(QUEUE **) &((*(q))[1]))
#define QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q)))
#define QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q)))
>>
>>59088069
You can write retarded and overcomplicated things in any language.
>>
>>59088120
I was stating how beautiful those macros are.
>>
File: kek.gif (2MB, 250x250px) Image search: [Google]
kek.gif
2MB, 250x250px
>>59088120
>thinking OP's code is retarded and, of all things, complicated (at all)
>>
>>59088069
>I'm incompetent to write anything other that childish procedural code
: the thread
>>
>>59088207
>procedural code is for children
>object-oriented code is for adults
>war is peace
>freedom is slavery
>ignorance is strength
>>
Are you literally mentally challenged? Do you even realize you fucking autistic sperglord what 4 kilobytes mean to a modern computer? Jesus fucking christ I swear to god those idiots are going to die of stupidity before 40.
>>
>>59088191
There's absolutely nothing about direct text substitution macros that's not retarded.
>>
C++ master race. Classes are zero-overhead C structs by default. Methods only do expensive virtual calls if you explicitly define them to be virtual. It's pretty nice desu. You can make a java-like monstruosity, but if you do you have only yourself to blame because you couldn't not be aware of the overhead.
>>
This is perfectly fine in C

        dest[0] = palookupoffse[0][bufplce[0][(place=vplce[0])>>bits]]; vplce[0] = place+vince[0];
dest[1] = palookupoffse[1][bufplce[1][(place=vplce[1])>>bits]]; vplce[1] = place+vince[1];
dest[2] = palookupoffse[2][bufplce[2][(place=vplce[2])>>bits]]; vplce[2] = place+vince[2];
dest[3] = palookupoffse[3][bufplce[3][(place=vplce[3])>>bits]]; vplce[3] = place+vince[3];
>>
>>59088176
You should add a second set of parentheses around your arguments and around the output. Better safe than sorry when dealing with macros.
>>
>>59088069
This is perfectly fine in C.
 struct line {
int length;
char contents[0];
};
>>
>>59088231
object-oriented code is for children too, brainlet
>>
>>59088207
Procedural code is the best model of how computers actually work, though.

>>59088297
Why wouldn't it be? Array declarations are just pointers to storage allocated on the stack or in bss. A zero-size array would mean the same thing as an uninitialized pointer.
>>
>>59088378
https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
>>
main[-1u]={1};

This is fine in C.
http://codegolf.stackexchange.com/questions/69189/build-a-compiler-bomb not mine
>>
>>59088243
I could elaborate but I'll just say that's your opinion.

You can either seek the reasoning behind my statement or simply tell yourself you're right, makes no difference to me.
>>
>>59088069
OOP IN THE LOO
>>
>>59088484
There is literally nothing wrong with this.
>>
>>59088484
There are completely valid reasons for using a negative array index.
Thread posts: 20
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.