MFW you can pass functions as parameters in C

>MFW God's language

did.not.know.that

>not knowing what a function pointer/callback is
nigga like half of the libraries use these.

Literally every function language can do this.

den/10
got a good kek and got me to reply

You can do the same in C# tbqh

Where did you come from, PHP 5?

That's not even interesting compared to making arrays of pointers to functions and selecting the correct one based on a variable.

Java and C# are superior.

Java:
}
new Thread(this::xxx).start();
{
void xxx() {
}

and:

Runnable runnable = this::xxx;
runnable.run();

C#
{
new Thread(xxx).start();
}
void xxx() {
}

and:

Action action = xxx;
action();

Is this the new desktop thread??

(&class::function, this)

relly maks u think

Fucking this. That's what I did for my MIPS simulator at uni, I got the best grade. Array of functions indexed by the opcodes.

Until the day comes when you have to produce some very efficient/fast code and save as much resources as possible, thus discarding the use of noob languages such as the ones you mentionned.

Now implement MIPS Pipeline in VHDL on an FPGA board, with a real working program written entirely in binary. Then boast about it. That's what we did in uni.

This. We did this too, and this was the way to understand how computers actually work. These faggots that say C teaches how computers work are full of shit.

We did it in the first semester. Very instructive and all, helps a lot for the low level understanding of computers. Yet I still think I learnt a lot doing the C simulator, with the whole ELF loading part, plus we did some basic (yet pretty functionnal) malloc/free management.
Being able to cross compile C code for MIPS and then see it running perfectly on your simulator is a very nice feel.

Very nice. I retract my words.

God damn dude how insecure are you

Enough to jizz in my pants at the sight of a girl.

html

you can't. You can only pass pointers to functions and invoke them.
kys / sage

>kys
Fuck off back to YouTube and kill yourself.

>These faggots that say C teaches how computers work are full of shit.
Very much so. That meme should be rewritten from
>C teaches you how computers actually work
to
>C teaches you how other programming languages actually work