• mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    52
    ·
    3 months ago

    With no context, this could be an honest attempt to learn about different tools, a thinly veiled set-up to promote a specific language, or an attempt to stir up drama. I can’t tell which.

    It’s curious how such specific conditions are embedded into the question with no explanation of why, yet “memory safe” is included among them without specifying what kind of memory safety.

    • Buttons@programming.dev
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 months ago

      The question mine as well be “what is your favorite compiled language?”. There is a lot of overlap between the possible answers.

    • AbelianGrape@beehaw.org
      link
      fedilink
      arrow-up
      4
      ·
      3 months ago

      Yeah, I like subleq.

      • compiler is extremely fast, faster even than tinycc
      • strongly statically typed: all values are ints. Since it’s all of them, you don’t even need to write it!
      • memory safe: the entire (virtual) address space is guaranteed to be accessible at all times so there’s no way to leak any of it (can’t release it anyway) or to segfault (it’s all accessible).

      Subleq is the obvious winner in my mind.

    • sus@programming.dev
      link
      fedilink
      arrow-up
      32
      ·
      3 months ago

      Garbage collection is still allowed, and technically JIT languages are still compiled so it really isn’t that restrictive

    • paperplane@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      3 months ago

      Not that specific tbh, most newer native languages these days are compiled and memory safe (Rust, Swift, Go, Kotlin Native, etc)

    • warlaan@feddit.org
      link
      fedilink
      arrow-up
      5
      ·
      3 months ago

      C# isn’t exactly compiled, at least not into machine language. It is transpiled into byte code that is run on a virtual machine that on turn is an interpreter/JIT-compiler.

      Depending on why someone is asking for a compiled language that may or may not be a problem, because to the one writing the code it looks like a compiled language, but to the one running it it looks like an interpreted one.

      • GetOffMyLan@programming.dev
        link
        fedilink
        arrow-up
        13
        ·
        3 months ago

        It is compiled to bye code. Just to be clear transpiling is completely different. It is also not interpreted.

        But ahead of time compilation is available now. So you can compile straight machine code.

        The newer tiered JIT can actually give better performance than a traditional compiler as well.

        Overall C# is an awesome language. If performance is absolutely critical you can use raw pointers and manual memory management, but obviously you lose safety then.

      • Undertaker@feddit.org
        link
        fedilink
        arrow-up
        4
        ·
        3 months ago

        It is compiled into bytecode. A transpiler translates to another programming language with the same level of abstraction. A compiler translates into a level that is nearer to or machine code.

  • demesisx@infosec.pub
    link
    fedilink
    English
    arrow-up
    29
    ·
    edit-2
    3 months ago

    As others have said, Haskell and Rust are pretty great. A language that hasn’t been mentioned that I REALLY want to catch on, though, is Unison.

    Honorable mention to my main driver lately: Purescript

  • Lambda@lemmy.ca
    link
    fedilink
    arrow-up
    24
    ·
    3 months ago

    Ada, hands down. Every time I go to learn Rust I’m disappointed by the lack of safety. I get that it’s miles ahead of C++, but that’s not much. I get that it strikes a much better balance than Ada (it’s not too hard to get it to compile) but it still leaves a lot to be desired in terms of safe interfacing. Plus it’s memory model is more complicated than it needs to be (though Ada’s secondary stack takes some getting used to).

    I wonder if any other Ada devs have experience with rust and can make a better comparison?

  • hessnake@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    3 months ago

    I started learning Go about 3 months ago and it quickly became one of my favorite languages. It feels like C with a bunch of Python niceties thrown in. And performance isn’t super critical in my work so being garbage collected is fine with me.

  • skulbuny@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    15
    ·
    3 months ago

    People don’t understand that JIT languages are still compiled, JIT literally describes when it’s compiled.

    That said, F# and/or OCaml.