lobsang_ludd
lobsang_ludd t1_ixdcsy2 wrote
Reply to ELI5: What is the difference between classes, constructors, structs and methods in C# by Sure-Ad-5053
Struct: a bundle of data combining some set of named fields of different (potentially overlapping) types. It models an "AND" relationship between its fields, asserting that at some point in the system state they were all true together. It has no behaviour, and its data cannot be changed - although you can make a copy with a different value in a particular field.
Class: A bundle of data with behaviours. It has some set of methods that can be used to act on it, changing the data in accordance with the rules defined by its programmers. Classes can have an inheritance hierarchy, where instances of a derived class can use code from the parent class or an override method in their own class.
Constructor: A special case of the methods of a class, which is run when a new instance of the class is made. It's generally responsible for ensuring the assumptions made by other methods will be true.
lobsang_ludd t1_jebd5gg wrote
Reply to ELI5: how can the female to male population be almost 1:1 but men die more than women and the birth rate of men and women is almost equal (and the fisher principle doesn’t make sense because men have a higher death rate so how can it even out)? by noobia0009
The birth rate for males is higher. For 2020, the ratio varied between around 1.02 males/female to 1.13 males/female, depending on which country you're looking at. Since those children then go on to have higher likelihood to die before maturity than the females, the two groups are pretty close to 1 male/female at maturity.
That is the thing that the Fisher principle predicts - an environment where males die without reproducing more frequently than females do will produce a selective pressure that means more males will be born in order to compensate.