Digging up, found out what called mystery
Continue my learning on Objective-C, here what’s I’ve found regarding to Objective-C and those low level stuff in the world of programming kinda thing.
- Pointer is really amazing.
- Typecasting is just a hint to compiler.
It doesn’t actually convert stuff back-and-forth. - “self” (or “this” in higher language programming), and “super” are runtime manner.
Those things will be checked in runtime what the stuff we’re working on as “self” or “this” or “super” is. - Key-value style coding is not used for only technique in programming like Dictionary but for help solving when we don’t know just yet what “key” or name to query for information.
- Several compilers out there are different in various senses, understand them closely will help you know pros / cons of designing a new programming language or even programming.
- We cannot modify to structure which is pointed to via pointer. What’s pointer point to can only be determined in runtime not the compile time in which structure lands in.
Take the following example,
ptr.structure.number = 1;
ptr is denoted as a pointer. It points to something that has one of its instance variable as “structure”. In this case, we can’t do like the code says as “structure” will be determined only in compile time (it’s a primitive type). If this code is compiled, the compile will give out the error message telling you that it cannot find such a place where structure lives in, and this is because “ptr” can only be determined in runtime only ! - id (in Objective-C) is void* (in C)
- Factory method is like a handy method to return out the creation of a new instance of its class without much effort to plug in lots of parameters.
- Global utility method, all those stuff that can be used directly from the Class you intended to use without even need to create an instance from it first.
- UI creation tool (like Nib for Objective-C) is to help developers quickly get interface shown and running without messing around with actual coding. In fact, behind the scene, the tool helps them to generate code similar to manual typing it but with benefit that you can see for what you want it to be.