Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #26983
| From | Bernd Paysan <bernd.paysan@gmx.de> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Inheritance |
| Date | 2013-11-26 22:28 +0100 |
| Organization | 1&1 Internet AG |
| Message-ID | <l733q4$in6$1@online.de> (permalink) |
| References | <52933ba3$0$294$14726298@news.sunsite.dk> <96ednQd94ZBxXQ7PnZ2dnUVZ_h-dnZ2d@supernews.com> <529473e2$0$292$14726298@news.sunsite.dk> |
Doug Hoffman wrote: > "Costs little" is a subjective term. This is true only for speed and > only if all vtable calls are used. See my response to Bernd. If speed > *and* code size are important then that changes things. See my response, a vtable call is 2+3 bytes on x86, a direct call is 5 bytes. Same number of bytes, same number of cycles (in the branch target hit case) on x86. >> In general, no. Even if you know that your instance variable is an X, >> you don't know that it isn't a subclass of X. Early binding serves >> only to restrict the way code can be resued. > > In general *always* with FMS. The class of the embedded-object-as > -instance-variable is not going to change. That is a severe limitation. I've both in BerndOOF, embedded-objects that can have only one class, and embedded-by-pointer objects that have the identical syntax for use, but can have different classes. Guess what: I never use the fixed, inflexible embedded objects. And yes, I think when I and you talk, we always talk about completely different object models. That's why I mostly gave up on standardization (of the model; maybe some meta stuff can still be standardized): Different people have so vastly different understandings of what OOP is, and it's always like talking to the blind men with the elephant. Accept it: OOP is bigger than you can comprehend. I know I'm only using a certain part. My OOP is flexible and strong, but I know it is just next to something rigid and inflexible. I've also seen OOP that is thin and not strong, but makes a lot of wind when moved, and OOP which is just a massive body (the "bloat"). -- Bernd Paysan "If you want it done right, you have to do it yourself" http://bernd-paysan.de/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Inheritance Doug Hoffman <glidedog@gmail.com> - 2013-11-25 06:59 -0500
Re: Inheritance Bernd Paysan <bernd.paysan@gmx.de> - 2013-11-25 20:01 +0100
Re: Inheritance Doug Hoffman <glidedog@gmail.com> - 2013-11-26 05:11 -0500
Re: Inheritance Bernd Paysan <bernd.paysan@gmx.de> - 2013-11-26 22:09 +0100
Re: Inheritance the_gavino_himself <visphatesjava@gmail.com> - 2013-11-27 15:25 -0800
Re: Inheritance Bernd Paysan <bernd.paysan@gmx.de> - 2013-11-28 01:39 +0100
Re: Inheritance Mark Wills <markrobertwills@yahoo.co.uk> - 2013-11-28 01:53 -0800
Re: Inheritance Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-11-25 15:28 -0600
Re: Inheritance Doug Hoffman <glidedog@gmail.com> - 2013-11-26 05:11 -0500
Re: Inheritance Bernd Paysan <bernd.paysan@gmx.de> - 2013-11-26 22:28 +0100
Re: Inheritance Doug Hoffman <glidedog@gmail.com> - 2013-11-26 17:12 -0500
Re: Inheritance Bernd Paysan <bernd.paysan@gmx.de> - 2013-11-27 23:07 +0100
Re: Inheritance Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-11-26 17:11 -0600
Re: Inheritance Doug Hoffman <glidedog@gmail.com> - 2013-11-27 06:25 -0500
Re: Inheritance Andrew Haley <andrew29@littlepinkcloud.invalid> - 2013-11-27 11:58 -0600
csiph-web