|
-
December 31st, 2010, 06:25 PM
#16
Re: Constructor to extend existing class
there needs to be a way to add functions to a class without deriving or inheriting. Mostly because I like seeing
integrated = image.integrate();
more than
integrated = integrate(image);
mostly because in English the subject(object=image) is usually first then the verb(action=integrate).
01101000011001010110110001101100011011110010000001110011011001010111100001111001
-
December 31st, 2010, 06:35 PM
#17
Re: Constructor to extend existing class
 Originally Posted by answer
there needs to be a way to add functions to a class without deriving or inheriting. Mostly because I like seeing
integrated = image.integrate();
more than
integrated = integrate(image);
mostly because in English the subject(object=image) is usually first then the verb(action=integrate).
You could switch to C# if it's that important to you. C# has extension classes.
-
January 1st, 2011, 12:20 PM
#18
Re: Constructor to extend existing class
 Originally Posted by answer
there needs to be a way to add functions to a class without deriving or inheriting. Mostly because I like seeing
integrated = image.integrate();
more than
integrated = integrate(image);
mostly because in English the subject(object=image) is usually first then the verb(action=integrate).
Since you are already aware that an interface can be extended by writing non-member non-friend functions, it is not a need, it is a want
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|