View Single Post
  #12  
Unread 10-08-2010, 08:28 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
Quote:
Originally Posted by Kryso
And now I'm lost. Current class implementation doesn't create new or copy functions for each instance, they are stored in table that acts like both prototype and instance factory thanks to metatables. Making new copy of function instead of referencing it doesn't make any sense unless we need to access parent scope.
So let me get this straight, calling a function with a dot operator, i.e.

foo.bar();

will create a copy of that function each time it's called.

However, setting a variable with a dot operator, i.e.

foo.bar = 1;

won't create a copy of the variable each time it's set/used?
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote