Re: static virtual is a keyhole?
"Balog Pal" <[email protected]> Thu, 9 Oct 2003 14:24:50 +0100
| Newsgroups | gmane.comp.programming.keyholes |
|---|---|
| Message-ID | <023d01c38e7a$56367670$65bf9f81@bpnt> |
> >In C++ we have cv qualifiers, const, volatile, both, neither. The current > >language allows all the combinations. > > > >Suppose everything were as is, just const-volatile were not allowed. Would > >you call that a (gratuitous) keyhole applying your definition? > > Probably not. To date, I have resisted the urge to classify missing features as keyholes. The kinds of keyholes I'm interested in are gratuitous restrictions on features that are offered. For example, if some programming language said you can't have an array with more than 100 elements, I'd call that a keyhole. But if the language failed to offer arrays, the lack of arrays would not be a keyhole. Scott, I tried to figure out the logic here, but failed. So the most likely solution I found is you misimterpreted my example. Let me restate it: Current language: 0) int; // nonvolatile, nonconst 1) const int; // nonvolatile, const 2) volatile int; // volatile, nonconst 3) const volatile int; // volatile, const Supposed language variants: A) remove cases 1, 3: means no const. classification: "missing feature" B) remove cases 2, 3: means no volatile. classification: "missing feature" C) remove cases 1, 2, 3: classification: "missing feature" (I suppose you interpreted my words this way) D) remove only case 3: my classification: "keyhole" (my original meaning) As here the language has to implement both the features, and I see no sane reason to not allow the combination of the otherwise disjunct features. That well converts to your array example. Suppose our target is a 2-bit processor. And support was implemented, but with range limited to [0..2], as opposed to the limitless coverage of the full addressable range of [0..3]. If you thought of case D can you see why we come to different conclusions following seemingly the same rationale? Paul