Re: [Lit.] Buffer overruns

From: Xcott Craver (caj_at_B-r-a-i-n-H-z.com)
Date: 12/21/04


Date: Tue, 21 Dec 2004 09:17:08 GMT

Mok-Kong Shen <mok-kong.shen@t-online.de> wrote:
>
>Xcott Craver wrote:
>
>> I believe there is an attempt at type-safe C called Popcorn.
>[snip]
>
>I should appreciate it, if any reader happens to have a literature
>reference to post.

Try, http://www.cs.cornell.edu/talc/papers.html, 3rd paper down to
start.
  
> I suppose, though, that the type-safe version would severely restrict
> the commonly seen style of programming in C, especially in respect of
> the use of pointers.
   
IIRC, pointers are still allowed, but not pointer arithmetic, or
pointer casting. Popcorn also has some of the good elements from ML,
such as tuples, e.g. *(int, char[20]) foo = new (305,"John Smith")
and parametric datatypes.
  
Also: the Cyclone project, another type-safe version of C, is at
http://www.research.att.com/projects/cyclone/
  
                                                    --X



Relevant Pages

  • Re: porting from C++Builder
    ... don't really know what pet language you're talking about, ... Function pointers are type-safe, don't know what makes you think otherwise. ... just syntactic sugar for local types. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: [Lit.] Buffer overruns
    ... > handling of pointers, you can't do integer operations (like XOR) on ... Type-safe and GC are orthogonal issues. ... pertinant language feature was GC, ...
    (sci.crypt)
  • Re: Real World Flunks (Re: Why is Object Oriented so successful)
    ... AndyW wrote: ... "modeling the real world". ... CADD screen closely matches the object pointers in a typical real- ... I think the fact one has a reference to it ...
    (comp.object)
  • Re: The Java no pointer big fat lie!
    ... > reference types, it wouldn't be a good comparison. ... and what you can't - and there is a big difference in Java to C and C++. ... You cannot change it in the language itself, ... Thus I would distinguish pointers from ...
    (comp.lang.java.programmer)
  • Re: couple of general questions
    ... > reference thing.I thought that pointers are under the reference ... the same value as the identifier of the caller. ... compiled code stores the value 20 directly into the variable that the ...
    (alt.comp.lang.learn.c-cpp)