

4·
26 days agotypes in C are pretty weird
int *a can be read as
*ais a int- since dereferencing is a operator on pointers,
ais a pointer toint
int *a, b is read as
*aandbareint- so
ais a pointer tointandbis aint
bool getofmylawn(Lawn lawn)
getoffmylawn(Lawn lawn)is abool- since calling is done on functions,
getoffmylawnis a function that takes aLawnand returns abool
And then you have function pointers
bool (*foo(int a))(float b)
(*foo(int a))(float b)is abool*foo(int a)is a function fromfloattoboolfoo(int a)is a function pointer fromfloattoboolfoois a function that takes aintand returns a function pointer fromfloattobool
really weird in my opinion.

Isn’t this just like the internet though?