[sdiy] Pointers in C
Magnus Danielson
magnus at rubidium.dyndns.org
Tue Jan 3 22:52:04 CET 2012
On 01/03/2012 10:13 PM, Neil Johnson wrote:
> Jay,
>
> Jay Vaughan wrote:
>> Union aliases don't optimize access, they document usage. Can't make a
>> union without structs as unions are a special form of struct in the
>> first place..
>
> I agree that while unions share some syntactic similarities with
> structs, they are not a "special form of struct" as you write -- they
> are completely different.
I disagree here Neil, they are very similar but different from structs.
They are like structs, where the members don't get offsets, but the
complete storage will fit all members just like structs, just that they
don't all fit in at the same time individually.
They are not completely different, the if-statement is completely
different from the union. They are different, but not completely
different, as there is too much similarities. Compare other different
but not completely different constructs such as the while-statement and
the do-while-statement.
Cheers,
Magnus
More information about the Synth-diy
mailing list