• kamen
    link
    fedilink
    22 months ago

    As if default keywords are the biggest deal-breaker.

  • Destide
    link
    fedilink
    English
    23
    edit-2
    2 months ago

    Just needs a rap about the fun in functions performed by 60-year-old seniors

    • @stetech@lemmy.world
      link
      fedilink
      72 months ago

      C# is basically Java and from what I can tell, this looks approximately valid.

      Variables can always* be named freely to your liking.

      *You used to have to stick to the Latin alphabet, but that’s increasingly not the case anymore. Emoji-named variables FTW!

      • @jaybone@lemmy.world
        link
        fedilink
        22 months ago

        No it’s not “basically Java”

        Aside from how Microsoft stole it, fucked the standard library, fucked the naming conventions, etc. You would never just “throw” without specifying what you were throwing.

            • To be honest I’m just playing into the meme of Java.

              My understanding is it’s academically great, but a pain in practice.

              For reference we use C# .Net, Entity Framework with GraphQL and React TypeScript for our enterprise applications and I really like C# now, but when I first started I’d only really used Node.js and some Java.

              • @Zannsolo@lemmy.world
                link
                fedilink
                1
                edit-2
                2 months ago

                I started my career in Java and transitioned to c# a few years in and c# is much better imo, especially now that .Net can be run in Linux.

                I run a team for a large project (13 deployable components apis/ Windows services/ desktop applications/ websites/mobile) that has mix of vb.net/c# .net framework 4.8 and .net 6 soon to be 8 with angular for Web and wpf for desktop. Slowly but surely working to kill off our legacy code and consolidate.

                Some of the older vb code (that existed long before I joined the project let alone became the lead dev) is so bad that a bug fix for nhibernate that stopped silently failing and began throwing exceptions breaks everything if we try to update to a later version. it’s such a tangled mess and I’m probably the only one on my team that could unfuck it(but I didn’t have the time to do it) it’s not even worth fixing even though our version of nhibernate has a CVE with rating of 9/10 (we don’t actually use anything that is affected from the finding thankfully) and are just biding our time till we kill off the offending apps.

                Ohh and I have a new PM that isn’t technical and likes to email me his chat GPT queries and results about technical things.

        • CodexArcanum
          link
          fedilink
          English
          122 months ago

          This is incorrect. The C# is valid. Throw in a catch statement simply rethrows the caught exception. Source: I’ve been writing C# for 20 years, also the docs.

          I won’t act like MS absolutely didn’t steal core concepts and syntax from Java, but I’ve always thought C# was much more thoughtfully designed. Anders Hejlsberg is a good language designer, TypeScript is also a really excellent language.

          • @jaybone@lemmy.world
            link
            fedilink
            32 months ago

            In Java you would say “throw e;” (to rethrow the same exception you just caught.)

            You wouldn’t just say “throw”

            Or you could also throw some other exception. But the syntax requires you specify what it is you are throwing. (And sane in C++, where you could throw any object, even a primitive.)

            So that was my question.

            • CodexArcanum
              link
              fedilink
              English
              62 months ago

              Wildly, in C# you can do either and it has different results. I believe a bare throw doesn’t append to the stack trace, it keeps the original trace intact, while throw e updates the stack trace (stored on the exception object) with the catch and rethrow.

              In C#, you can only throw objects whose class derives from Exception.

              • @Hoimo@ani.social
                link
                fedilink
                12 months ago

                You can do either, but you usually do neither. The best way is to throw a new exception for your situation and add the caught exception as an inner exception. Because rethrowing resets the stack trace, removing the context from an exception message that is often pretty vague, and “bouncing” with throw; doesn’t tell the next exception handler that you already handled (part of) the exception.

  • m33
    link
    fedilink
    42 months ago

    @sjmarf And now someone is preparing a PR on C#’s GitHub issues… well done, well done.

      • UnfortunateShort
        link
        fedilink
        22 months ago

        It’s because we are depressed nihilists who have given up on pretty much everything, running on gallows homour to a point where we are meming youth slang. Don’t worry, we’re fine haha… Ha…

  • @MystikIncarnate@lemmy.ca
    link
    fedilink
    English
    72 months ago

    Well. I think I’m officially out of touch with the newest generations slang terms. I only understood about half of that.

    • Clay_pidgin
      link
      fedilink
      English
      30
      edit-2
      2 months ago

      I have many gray hairs, but here’s what I know.

      • Highkey and lowkey - obvious and subtle.

      • fax is “facts” - true. Often in the sense of agreement.

      • Fuck around and find out - do something risky and reap the consequences

      • It’s giving - how it makes you feel, or what it reminds you of.

      • Cap and no cap - lying and telling the truth.

      • Big yikes - bad, especially cringey.

      • Tea - (n) gossip. (v) “spill the tea”

      • Shoutout - give credit to someone. I don’t think this one makes much sense here.

      • Yap - talk, especially too much or unnecessarily.

      • Yeet - throw, often without careful aim. (Unlike “Kobe”, which is a throw with aim)

      • @dependencyinjection@discuss.tchncs.de
        link
        fedilink
        27
        edit-2
        2 months ago

        You missed

        • Rizz = charisma
        • vibe check = Vibe is kinda like someone’s aura or energy. So to check their vibe is to call them out on it.

        Also got many grey hairs but I like to know what people mean and language evolves. Our generation did it too you get me blud.

        • Clay_pidgin
          link
          fedilink
          English
          102 months ago

          Thanks for the catch, I thought I got all of them. Stay skibidi and not Ohio, my friend.

                • @cecilkorik@lemmy.ca
                  link
                  fedilink
                  English
                  32 months ago

                  Florida is basically the unofficial US Capitol now, so it would be confusing and ambiguous to have it associated with the traditional forms of unexpected insanity. Now it’s going to be an entirely new kind of unexpected insanity, so Ohio has been selected to represent the old kind of unexpected insanity that Florida used to represent.

            • Clay_pidgin
              link
              fedilink
              English
              52 months ago

              It’s recognized by the yoots as the worst state, so being Ohio is bad!

              It’s worse than “mid”, which is meh.