Re: definition/explanation of an unboxed array in c is ...?



ben@xxxxxxxxxxxxxx wrote:
or is "unboxed" and "unboxed arrays" not really applicable to c ?

"Unboxed" and "boxed" aren't C terms. In some object-
oriented languages, they refer (usually informally) to
simple primitive variables and to full-fledged objects,
respectively. In Java, for example, a `float' variable is
a primitive and a `Float' is an object with a `float' hidden
("boxed") inside it. (Why bother? Because an object is an
instance of a "class," and the class provides "methods" that
code can use without necessarily being fully aware of exactly
what kind of object is at hand. This is said to promote code
reuse; IMHO "promote" is some distance short of "guarantee.")

C has "objects," but not in the way O-O languages use the
term. C's objects are passive receptacles for values; an O-O
language would probably call them primitives or aggregates of
primitives. In other words, all C variables of all kinds are
"unboxed," and there is no way to "box" them.

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: definition/explanation of an unboxed array in c is ...?
    ... In Java, for example, a `float' variable is ... C has "objects," but not in the way O-O languages use the ... language would probably call them primitives or aggregates of ... typedef struct node ...
    (comp.lang.c)
  • The fraud of primitive authenticity
    ... societies suffered the same casualty rate as primitive peoples, ... primitive peoples enjoy a quality - call it authenticity - that moderns ... to primitives to exterminate them rarely regretted having done so. ... that present-day languages descend from a small number of early ...
    (alt.gathering.rainbow)
  • Re: An array of function pointers - generated parametrically
    ... float f0 ... Space for an array of function pointers is allocated. ... The pattern you want is *very* common in many programming languages, ... set of function pointers for one function and a set of data pointers. ...
    (comp.lang.c)
  • Re: Writing bulletproof code
    ... >between primitive numeric types in those languages blurs the differences ... The implicit conversions make the language behave as ... distinction between primitives and user-defined types". ...
    (comp.programming)
  • Re: yasq
    ... Whilst in some other programming languages use is made of formatting ... format, ... here is a 'float' value: ... in Java you would do this: ...
    (comp.lang.java)