9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Bruce Ellis <bruce.ellis@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] const
Date: Thu,  8 Dec 2005 08:18:03 +1100	[thread overview]
Message-ID: <775b8d190512071318x1e52a4f2r3e358aadf0a83e32@mail.gmail.com> (raw)
In-Reply-To: <571511e7dddc323d94a6da81f35ba899@terzarima.net>

ken had total disregard for const and that is good enough for me.

i rememeber :rofix and other such hacks, but that was when memory
was an issue.

brucee

On 12/8/05, Charles Forsyth <forsyth@terzarima.net> wrote:
> > So it does the optimization possible with const.  Not the "interface"
> > part, though.  If you don't like type decorations, I guess this way's
> > better.
>
> it's not so much type decorations, as those that are not terribly useful or to some extent misleading.
> (mind you, java programs look like christmas trees--holiday trees to those of you in the US--
> with all their type and status decorations.)
>
> if you followed the earlier links you'll see one of the classic examples
> of it being fairly odd as an interface constraint:
>
>        char* strchr(const char* x, int y)
>
> but the resulting pointer points into the const string and ok, it doesn't write to it itself, but it
> hands you back a pointer into the same string so you can do it yourself!
> that's wierd, especially since it must effectively have cast x to plain char* internally
> so it's not much of a constraint either way.
>
> i find it's really a device for forcing the adding and removing of const
> until a compiler shuts up.   this is unusual, because most type clash diagnostics do mean something;
> perhaps not all that much, but something.   perhaps i'm lucky, but i have found bugs through
> type clashes (often when checking extern linkages) but i can't remember a single thing detected by const.
> it's one of those things where ``now it's there we might as well try to use it'' but i'm afraid i'm unconvinced.
>
>


  reply	other threads:[~2005-12-07 21:18 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07 10:34 Steve Simon
2005-12-07 12:17 ` Russ Cox
2005-12-07 13:01   ` erik quanstrom
     [not found]   ` <000401c5fb32$64502e00$14aaa8c0@utelsystems.local>
2005-12-07 14:10     ` "Nils O. Selåsdal"
2005-12-07 15:05       ` Steve Simon
2005-12-07 15:30         ` Lucio De Re
2005-12-07 15:53           ` C H Forsyth
     [not found]         ` <1E68F99F-78D7-4321-BE56-7D0319212596@telus.net>
2005-12-07 16:11           ` "Nils O. Selåsdal"
2005-12-07 17:27             ` Paul Lalonde
2005-12-07 16:23 ` jmk
2005-12-07 17:28   ` Skip Tavakkolian
2005-12-07 18:51   ` Joel Salomon
2005-12-07 18:58     ` Charles Forsyth
2005-12-07 19:30       ` Joel Salomon
2005-12-07 19:36         ` Brantley Coile
2005-12-07 19:51         ` rog
2005-12-07 21:07         ` Charles Forsyth
2005-12-07 21:18           ` Bruce Ellis [this message]
2005-12-07 21:22           ` Paul Lalonde
2005-12-07 22:04             ` Rob Pike
2005-12-07 22:44           ` Micah Stetson
2005-12-07 22:44             ` Micah Stetson
2005-12-07 22:46               ` Brantley Coile
2005-12-07 20:33     ` Skip Tavakkolian
2005-12-08  7:39 ` geoff
2005-12-08  7:53   ` Lucio De Re
2005-12-08  7:54     ` geoff
2005-12-08 10:23       ` Bruce Ellis
2005-12-08 15:58   ` Brantley Coile
2005-12-09  1:44     ` geoff
2005-12-09  2:04       ` Russ Cox
2005-12-09  2:19         ` geoff
2005-12-09  9:54         ` Charles Forsyth
2005-12-09 16:25   ` David Leimbach
2005-12-09 16:59     ` Richard Bilson
2005-12-09 17:42       ` David Leimbach
2005-12-09 19:17         ` Richard Bilson
2005-12-09 17:01     ` Ronald G Minnich
2005-12-09 17:39       ` Russ Cox
2005-12-09 17:40       ` [9fans] PCICIA Modem TamTam
2005-12-09 18:59         ` Sascha Retzki
2005-12-12 15:07         ` Paweł Lasek
2005-12-26  9:00           ` Martin C. Atkins
2005-12-26 14:19             ` Paweł Lasek
2005-12-09 19:37       ` [9fans] Re: const Nikita Danilov
2005-12-09 20:30         ` Russ Cox
2005-12-09 20:37         ` Ronald G Minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=775b8d190512071318x1e52a4f2r3e358aadf0a83e32@mail.gmail.com \
    --to=bruce.ellis@gmail.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).