Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: Combining m...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2822 of 2841
Post > Topic >>

Re: Combining mutable objects with const references

by Joachim Durchholz <jo@[EMAIL PROTECTED] > Apr 25, 2008 at 04:17 PM

Am Donnerstag, den 24.04.2008, 19:04 -0700 schrieb Paul Rubin:
> On a meta level, the notion that adding features to a language makes
> it more capable is tempting but bogus.

Not bogus - in fact adding a feature does make a language more capable.

> Adding feature X might give
> you the freedom to do X, but maybe what you really want is freedom
> -from- X.

Usually the situation is subtly different: you want to have X, but
you'll lose Y if you get X.

The Y that you lose is usually some kind of guarantee.
Adding mutability loses the guarantee that aliasing will never be a
problem.
Adding pointers into arrays loses the guarantee that you'll never get a
buffer overflow.
Adding reinterpreting casts loses the guarantee that a data object may
never be misinterpreted.
Adding a Turing-complete template language loses the ability to
typecheck templates.
Etc. etc. etc.

Few language designers even see the guarantees that they lose, mostly
because they never knew what kinds of guarantees are possible. And, of
course, forfeiting guarantee G may allow you to have features X, Y,
*and* Z, so it's very tempting to err on the pro-features side. (Logo
had many guarantees, but it had little features...)

Regards,
Jo




 1 Posts in Topic:
Re: Combining mutable objects with const references
Joachim Durchholz <jo@  2008-04-25 16:17:09 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:50:23 CDT 2008.