3 ms·
Except the wiki page about monkey patching talks about it in the context of dynamic languages :-) It doesn't talk about C, C++ or other compiled languages. Def
by kylequest 12y ago
Except the wiki page about monkey patching talks about it in the context of dynamic languages :-) It doesn't talk about C, C++ or other compiled languages.
Definitely nice work!
- simscitizen 12y agoDynamic and compiled are not mutually exclusive. Objective-C is both a dynamic and compiled (to machine code) language that supports monkey patching. It supports extending classes with new methods and overriding existing methods in existing classes through its category feature. This does have an unfortunate side effect though. Because Objective-C is a) compiled directly to machine code b) has no way of marking methods final and c) supports monkey patching, essentially no methods can be inlined by the compiler.
- kylequest 12y agoOf course, dynamic and compiled are not mutually exclusive. Go is not like Objective-C though and it doesn't support "Categories" or "extension methods" :)