|
|
|
|
|
by voidlogic
3377 days ago
|
|
Example, properties in C# can be method calls, and while they appear to have the complexity of accessing a field they actually could be arbitrarily algorithmically complex. This leads to a programmer down the road, calling it in a tight look, expecting field access overhead and getting somones complex property-method-logic. That is an example of magic. IMHO magic is when the run or space time complexity of a code isn't obvious by its on-screen representation. |
|
It looks like a simple for each loop, just like over a slice or map, but under the covers involves locking semantics.
If so, I guess I'll buy that definition of magic, I'm not sure thats any different than knowing what the language does.