Talk:Struct (C programming language): Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 82.9.176.129 - "Too "{{Tl|technical}}": "
This comment has been addressed.
Line 51:
::As a Java and Python programmer who has never worked with C, I find this article difficult to understand. I think the biggest reason is that the explanation is almost entirely in code (which is difficult to understand if you aren't familiar with C syntax), and it lacks a high level description of what a struct is for and more importantly ''why'' anybody would want to use one. I think it would also be helpful to draw parallels between it and similar concepts in other languages. I get the impression that this is maybe like Java's Enum type, but the article doesn't say what languages use structs, aside from C, and what equivalencies, if any, exist in other languages. -[[User:Thunderforge|Thunderforge]] ([[User talk:Thunderforge|talk]]) 20:05, 14 October 2013 (UTC)
::That doesn't really matter does it? Wikipedia is for a general audience. If an article is not useful in such a context, it doesn't belong here. If it is useful, it should at least be a stated goal to ''make'' it understandable by a general audience, even if it currently isn't. <small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/82.9.176.129|82.9.176.129]] ([[User talk:82.9.176.129|talk]]) 23:31, 7 November 2014 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
 
== Incorrect statement ==
 
The following statement in the article is incorrect:
 
"The memory is already given and zeroed by just declaring a variable of that type regardless of member initialization"
 
Asigning to a new struct by value from another struct will create a copy with the same layout, but if the rvalue is only partially initialized, the lvalue will also be partially initialized. None of the uninitialized fields will be magically "zeroed". The exception to this is structs with static storage duration -- but in the example, the structs have ''automatic'' storage duration. <small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/82.9.176.129|82.9.176.129]] ([[User talk:82.9.176.129|talk]]) 23:21, 7 November 2014 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->