Re: How to 'add' functions to existing type/class/struct/interface...

2011-05-21 Thread Matthew Ong
On 5/19/2011 11:23 PM, Adam D. Ruppe wrote: How to 'add' functions to existing type/class/struct/interface... You don't. It seems to be that this would break encapsulation anyway. This block of comments is totally not related to this thread, but just to set the record straight. Not entirely

How to 'add' functions to existing type/class/struct/interface...

2011-05-19 Thread Matthew Ong
Hi All/Walter Bright, The ability is able to be model and done by JRuby and also Google Go. Conversions ... // this function is now available for the object type Sequence. Done outside of Sequence.d func (s Sequence) MyFunction() string { // My Function has access to all the