I Tried C#

Discord Server: https://discord.gg/conaticus Github: https://github.com/conaticus Twitter: https://twitter.com/conaticus/ The keyboard …


  1. 2:02, it will has an error, because the OptionMenu is returning a string, which is not convertible to int.
    2:09, this time C# was shorter:
    #include <fstream>
    #include <algorithm>
    using namespace std;

    void CFile ()
    string name = ""; cout << "Enter the file name: "; cin >> name;
    //Assuming File was created as a ofstream File ("something.txt");
    File << "./" << name << ".c, include "" << name << """;
    auto headerDef = name;
    transform (headerDef.cbegin(), headerDef.cend(), headerDef.begin(), ::toupper);
    headerDef += "_H";
    string headerLines[] = { "#ifndef " + name, "n#define " + name, "n#endif //" + name };

  2. 1:39, C++:
    #include <vector>
    #include <iostream>
    using namespace std;

    auto ShowOptionsMenu (const char *msg, const vector <const char *> &options)
    cout << msg; int16_t i = 0, optionIdx;
    for (const auto opt: options) printf ("%d) t%sn", ++i, opt);
    cout << "Choice: "; cin >> optionIdx;
    return optionIdx; //Faster and more flexible to return just the index.

  3. 0:33, in C++ you can just use strings:

    const string header_name = file_name + ".c"; //If file_name was a string too.
    const string header_src = "#ifndef " + header_guard_def + "n#define " + header_guard_def + // … and so on.
    const vector <const char *> cmds = { "#ifndef ", "#define ", " // " };
    for (auto cmd: cmds) header_src += cmd + header_guard_def + "n";

  4. I understand that you're just learning and it's the first project you're ever building in C#(I hope so), but dude, this was physically painful to watch.

    I think this tells us a lot about supposed C++ "ugliness". It seems to be the code standards commonly accepted in the language community, not the language itself.

    So when you brought python/TS code style to C# you created some kind of horrible monstrosity nobody can look on without disgust. It's an uncanny valley of programming languages.

  5. I'll go ahead and tell you the end of this story. You'll love it, realize damn that's a big ecosystem. You'll spend two years learning the ecosystem.
    And M$ will completely change everything and tell you: this is how things are done now! Come learn the new hotness!
    Repeat every two years until you learn your lesson.

  6. C# is a great programming lanuage compared to java and javascript it's simple and clean easy to understand and the IDE visual studio code is increaderbley amazing its a really powerful IDE

  7. Say conaticus, could you tell me from your personal experience was it easier to learn C# because you already knew typescript? I am asking because I am 5 months into learning JavaScript and I am interested in learning C#. Would it make more sense to learn typescript first and afterwards learn C#? Or just jump right into C# after I get the hang of JavaScript?

  8. I’m a beginner, like literally weeks old

    But, I don’t understand why everyone says Pythong is good for beginners, it is confusing af
    C on the other side was so intuitive, haven’t used C# but I’m guessing those are similar

    That and everywhere I look, people calls about so much optimization and possibilities, while in Python everything was about “pythonic” or something like that, THAT SH*T IS JUST CONFUSING
    I don’t even know how to call information from a dictionary in a system, how tf would I know “pythonic” ways as a beginner

Leave a Reply

© 2023 53GB