Due to potential new direction of D, I’m looking for some escape route just in case. I’m primarily a gamedev, so no functional programming languages like Rust or Haskell. Also one of the features I dislike the most in C/C++ is the super slow and super obsolete precompiler with its header files, so no zig, I don’t want to open two files for editing the same class/struct. Memory safety is nice to have, but not a requirement, at worst case scenario I’ll just create struct SafeArray<Type>. Also I need optional OOP features instead of reinventing OOP with all kinds of hacks many do when I would need it.

Yes I know about OpenD, and could be a candidate for such things, just looking into alternatives.

  • mox@lemmy.sdf.org
    link
    fedilink
    arrow-up
    14
    ·
    edit-2
    2 months ago

    What new direction is D taking that has you worried? Maybe I should watch out for it, too. :)

    one of the features I dislike the most in C/C++ is the super slow and super obsolete precompiler with its header files,

    Are you sure you should lump those two languages together? In my experience, C++ preprocessing can be slow (especially when you use templates), but not C. I shudder to think what preprocessor shenanigans the C libraries you’ve used might be doing to make compiling with them super slow. (LLVM isn’t exactly known as a speed demon, though; maybe you’ve run into that?)

    In any case, I guess that rules out transpiled languages like Nimskull (work in progress) and its parent language.

    Have you looked at Odin?

    Maybe Vale?

    There is Jai (work in progress), though I haven’t looked closely enough to know if it fits your needs. (I’m not sold on Jonathan Blow’s judgment.)

    I suspect there are few languages well suited to both system and game programming (unless you mean game engine programming) that avoid all the things you seem to dislike. If you find one, I hope you’ll write about it here. If not, there’s always the option of using two languages.

    • Hawk@lemmynsfw.com
      link
      fedilink
      arrow-up
      5
      ·
      2 months ago

      There is also zig, Go and Rust.

      No language is perfect, but those languages have some features that are nice.

        • mox@lemmy.sdf.org
          link
          fedilink
          arrow-up
          7
          ·
          2 months ago

          Also, I don’t think Go is generally considered a systems programming language.

          • Hawk@lemmynsfw.com
            link
            fedilink
            arrow-up
            3
            ·
            2 months ago

            I agree, it’s not often considered a systems programming language and it may not be the perfect tool here.

            However, it is worth mentioning that cgo Can serve as a escape hatch depending on the use case.

        • Hawk@lemmynsfw.com
          link
          fedilink
          arrow-up
          5
          ·
          2 months ago

          Ah my bad, didn’t read.

          Odin is a nice choice then, beef is another small bespoke language.