Talk:Boilerplate (text)

From Wikipedia, the free encyclopedia

Why is library linked to in this item? The link I see ("you must type #include <stdio.h> in C therefore library inclusions are boilerplate") is spurious at best. 83.244.198.194 (talk) 13:48, 21 December 2007 (UTC)

The C code is a bad example for the point being made, the argc and argv parameters to main() are not used, so there's no need to declare them. As you hint at, including <stdio.h> is optional in older variants of C. JonathanWakely (talk) 17:09, 3 February 2008 (UTC)
The if __name__ == "__main__": line in the python example is not strictly necessary either. It's only necessary if you want the behavior of a python program to be different when it is executed directly to when it is imported. In this case, I see no reason to complicate things by adding it. SpaceDude (talk) 14:34, 14 April 2008 (UTC)
This line in python was included because there was a revert war with someone trying to remove the standard argc, argv parameters, arguing that they made the code unfair to C (because they are really not needed), and someone arguing that they are typical C boilerplate. Thus I added typical Python boilerplate to make the comparison between languages fair, without removing content. Diego (talk) 11:35, 15 April 2008 (UTC)
Why not just replace both examples with java? The private static void main (String args[]){new <class name>;} really is pretty much standard. 139.57.100.104 (talk) 17:00, 5 June 2008 (UTC)

[edit] add a bit about boilerplate robot

look up the robot and add something about it

this has been done some time ago: Boilerplate (robot) -- JonathanWakely (talk) 16:19, 3 February 2008 (UTC)