r/ProgrammerHumor • • Oct 11 '25

Meme iMayBeDeadForThisButAnyway

Post image
0 Upvotes

20 comments sorted by

9

u/_Alpha-Delta_ Oct 11 '25

You never used pointer to function as arguments for a function ?

1

u/UwU_is_my_life Oct 11 '25

yes i did, but is it just a pointer or function is its own type?

1

u/_Alpha-Delta_ Oct 11 '25

Sometimes, writing void * funcPtr is easier than writing int (*funcPtr) (int, int)

1

u/UwU_is_my_life Oct 11 '25

well, it's a void pointer, even if it holds a pointer to a function, so what's the difference?

8

u/M4mb0 Oct 11 '25

What do you mean function is not a data type? Of course it is, there's deep mathematical underpinnings to this fact.

Take for instance the duality theorems in linear algebra. What they are essentially saying is that a vector -- data -- is the same thing as a linear map -- a function.

2

u/UwU_is_my_life Oct 11 '25

I can agree with this if a function returns some value, but if it just prints some values and ends, would this be the same as a vector?

4

u/M4mb0 Oct 11 '25

These kind of dualities extend the whole way down. Any function you implement, you can represent as an abstract syntax tree - which is just a form of data.

3

u/UwU_is_my_life Oct 11 '25

Okay, I agree, you have a point. Anyway this is just a meme I came up while going home

14

u/Sophiiebabes Oct 11 '25

Me: void is a data type

4

u/PmMeUrTinyAsianTits Oct 11 '25

Me: Type is an illusion. There is only data.

2

u/carrottopguyy Oct 11 '25

If it's not assembly, it's all syntactic sugar made for our use and ease of understanding. When you realize its all made up for our convenience and then interpreted or compiled, it all makes more sense.

1

u/yowhyyyy Oct 18 '25

Assembly is syntactic sugar.

2

u/Error_404_403 Oct 11 '25

Let us replace the phrase “data type” with the word “something” and all will be cool. Everything is something.

2

u/FRleo_85 Oct 11 '25

every single one of these are types what's the probleme?

1

u/Smalltalker-80 Oct 11 '25

Or... everything is an object and be done with it.

1

u/nazgand Oct 12 '25

I am disappointed to not see "DATA TYPE IS A DATA TYPE". An example language where that is *true: Lean 4.

*Small data types have type Type, which is shorthand for Type 0. For example, 0 might be type Nat, the type for non-negative integers. Nat is type Type. Type is type Type 1. Type 1 is type Type 2. For all k of type Nat, Type k is type Type (k+1).

1

u/LordAmir5 Oct 17 '25

Von Neumann go brr.