TCP + UDP, CLIENT + SERVER model

Miscellaneous Forums/General Discussion/TCP + UDP, CLIENT + SERVER model

You don't need to do `Self.` within a method because methods automatically refer to the local instance's fields as implied. You only need `Self.` within a function within a type.


You also don't need to use remarks either, the compiler will compile the program without any remarks.....

Professionally, as in every software development job I have had outside the game industry, not using self in this case would get you close to canned for being an inconsiderate prick. It's just common courtesy to use me.(vb) $this->(php, etc) and so on in your methods to indicate where this variable is coming from, that it in fact belongs to the class/type/struct/namespace structure and just isnt some local variable created on the fly by the lack of strict. So many sloppy coders out there use a global function in a method (or a global Variable) and you spend a huge amount of wasted time hunting down which file that global function is in (out of the oodles of includeded files).

Best one I have ever seen was a variable in a method of a c program on a VMS system called "thisthing".... It wasn't a member of the structure, and 15 included files later I found it was pointed to by a global....

In my opinion, take the extra min to type the "self"'s as it saves on a load of headache for yourself and others later on when methodologies become loosened by a long winded project that just wont finish itself.