3 ms·
> Ever since then I have not been able to figure out why it is commonly taught next to the variable name. C does this very cute (read: horrifyingly unintuitive
by supplementation 6y ago
> Ever since then I have not been able to figure out why it is commonly taught next to the variable name.
C does this very cute (read: horrifyingly unintuitive) thing where the type reads how it's used. So "char ⋆a" is written so because "⋆a" is a "char", i.e. pointer declarations mimic dereferencing, and similarly, function pointer declarations mimic function application, and array declarations mimic indexing into the array.
- sergeykish 6y agoI found it much easier to understand than Pascal. It just clicked. Later there was a moment of confusion with "char* a, b". It helped than I've learned by K&R C book. Windows API and code examples are horrific, like another language. https://docs.microsoft.com/en-us/windows/win32/learnwin32/windows-coding-conventions https://docs.microsoft.com/en-us/windows/win32/learnwin32/wi... https://docs.microsoft.com/en-us/windows/win32/learnwin32/managing-application-state- https://docs.microsoft.com/en-us/windows/win32/learnwin32/ma...