Support me on Ko-fi: ko-fi.com/jona... Jonathan Blow on Function Naming Clip from Jonathan Blow Twitch: / j_blow KZbin: / @jblow888 #jonathanblow #gamedev #webdevelopment #programming #jai
Пікірлер: 11
@theeblekbern3 ай бұрын
This might be the first video where Jon doesn't have a strong opinion about stuff xd
@StepanTrvaj3 ай бұрын
He mostly doesn't but the things that get clipped and receive attention are usually at least a bit controversial.
@gruntaxeman37403 ай бұрын
In my opinion, namespacing is the reason why someone want to write C++, instead of C. C doesn't need namespacing when every task is own process. But when ~everything is put to same process to avoid context switching, that is where namespacing is important. And naming of functions, or everything... is extremely important. I just name things as "foobar" or something until I really what name should be and not forgot to check those. PHP function naming is warning example what happens if developer is not careful.
@thebatchicle3429Ай бұрын
Prefixing solves basically all of C’s issues with namespacing tho
@gruntaxeman3740Ай бұрын
@@thebatchicle3429 Nope, because there is 31 character limitation on identifier naming. Prefixing cause developers to prefer those 6 character function names and single letter variables on C and code is just not as readable than modern languages. C works indeed fine on enough small programs where it was designed to. Intention was that stuff is stdin -> stdout building blocks connected with higher level languages but that model is mostly outdated on high performance software.
@protolactor19 күн бұрын
@@gruntaxeman3740 What a made-up problem. If you need even 10 characters for a namespace prefix, and the name limit is 31 characters, then you have 21 characters left for a name. That is way more than 6 characters, and is more than enough. If you want more, write a comment.
@gruntaxeman374019 күн бұрын
Often that is not enough and suggesting writing comment is that you admit that it is not enough.
@protolactor19 күн бұрын
@@gruntaxeman3740 I do not admit that it is not enough, or "often not enough" as you put it. It is only a suggestion to you, who thinks that a 31 character long function name is not enough.