• 2 Posts
  • 197 Comments
Joined 2 years ago
cake
Cake day: July 3rd, 2023

help-circle


  • Check out this reference (not mine): https://gist.github.com/DanielKoehler/606b022ec522a67a0cf3

    The first difference that I would point out is c# use of static typing, where python is dynamic. This author is using the var keyword to avoid specifying a type for variables. The type is, instead infered by the code that follows the equals sign.

    The next main difference is the use of whitespace. Python is very whitespace aware, it uses indentation and line breaks to organize code. C# is whitespace agnostic in most cases and separates blocks of code using curly braces {…}, statements must end with a semicolon;

    In C# collections are organized by how the data is accessed and whether elements can be added or removed. Arrays are initialized with a set of items and can’t be made longer, a List can be added to and can be removed. The key point is that all items in a collection are of the same type.

    Complex objects (that have properties and methods) can be structs, classes, or records but they all basically do the same thing and interact in the samish way. You have to use the new keyword to make a new instance.

    Classes and records can inherit from another where as structs cannot. Properties must have a type, methods must return a type or void. Method parameters must be typed, when calling a method the provided parameters must be of the proper type.

    An interface describes requirements an implementing class, record or stuct must meet (i.e. properties and methods). You can’t make a new interface, it’s more of a qualification.

    I hope this helps some











  • DrDeadCrash@programming.devtoMemes@lemmy.mlThe Benefits of World Hunger
    link
    fedilink
    arrow-up
    1
    arrow-down
    3
    ·
    edit-2
    4 months ago

    I think “describing it as if it were normal” only helps the people who support this arrangement because it gets normalized. That’s where the accusation of conservatism came from, that and the way they tried to shut me down with insults.

    Edit: given that there are likely to be a lot of people that agree with this argument unironically, doesn’t it seem irresponsible to play some game where you pretend like you support it? Without ever coming out against it at the end?

    Really, it’s just naked approval, with any disapproval left as an exercise to be performed by the reader.



  • DrDeadCrash@programming.devtoMemes@lemmy.mlThe Benefits of World Hunger
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    4 months ago

    Who would build any sort of factory if they did not know that many people would be available to take the jobs at low-pay rates

    Much of the hunger lirerarure talks about how it is important to assure that people are well fed so that they can be more productive. That is nonsense

    No one works harder than hungry people.

    […]well-nourished people are far less willing to do that work

    For those of us at rhe high end of the social ladder, ending hunger globally would be a disaster.

    I guess the irony is lost on me. Nothing here indicates that it’s wrong or should change. Also, you’re a huge asshole.

    Edit: in fact I know people (conservatives) who are totally fine with this arrangement. They are huge assholes too, huh isn’t that weird.