tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Segmentation fault compiling jslong.c


From: Peter Lund
Subject: Re: [Tinycc-devel] Segmentation fault compiling jslong.c
Date: Fri, 21 Sep 2007 14:31:05 +0200

On Thu, 2007-09-20 at 23:38 -0500, Rob Landley wrote:

> You've mentioned Harbison and Steele more than once, but otherwise I've never 
> heard of them.

It's the standard work that everybody uses instead of reading the
standard ;)

Seriously.  It is a reference book on C written to complement K&R and
has been used as such since the first edition in the eighties (predating
the standard).

> My problem is you're leaning too hard on a very specific vocabulary.  As I 
> said, I've been programming in C for 17 years and in that time I honestly 
> don't remember ever hearing anyone refer to "projection", so when you refer 
> to it as a vital theoretical concept and imply that this name is commonly 
> used for it, I tend to stop paying attention to the rest of the paragraph...

Projection is completely standard in type theory and semantics.
Despite the fact that C doesn't lend itself well to having its semantics
rigorously described, it /is/ nice to have a common vocabulary about it.

> > > ("Value projection operators"?  Insert raised eyebrows.)
> >
> > Structs are opaque; you can only get access to member values by
> > projecting them into the containing scope.  An expression like s.foo
> > projects the value member foo beyond the scope of its declaration into
> > the scope of the expression.  If i is extern, use of i is like
> > "_globals->i"
> 
> I know how to use a struct, thanks.

Yes.  But you asked about "value projection operators" and got a simple,
straightforward answer.  Don't put people down who try to help you.

-Peter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]