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.

  • Mia@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I’ve found working with Rust and Bevy to be quite pleasant. If you’re used to working with ECS, I suggest you at least give it a go.
    Rust is as functional as C++ 20 with ranges and views is, which is to say it isn’t. Not sure where you got that impression from, but while it does borrow some ideas from functional languages, it’s still very much a procedural one.

    Zig doesn’t have headers, nor inheritance. Again, not sure where you got that from, but Zig is basically a modern C, so there’s no OOP anywhere, let alone multiple inheritance.

    As for what to use, I think they’re both viable alternatives. I lean more towards Rust, but that’s just due to familiarity. Odin also looks like a viable option, if you don’t mind a smaller ecosystem.
    If you want a garbage collected language, then I’d go for C#. Despite its historic reputation as a Windows only language, its been cross platform and open source for roughly a decade at this point. I find it great to work with.

    • ZILtoid1991@lemmy.worldOP
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      Issue with C# is, that it’s quite far away from a system language, and I would have to write the engine’s main core in some more system-level language, and I don’t consider it good practice to write every component that doesn’t directly interfacing with the OS in a trendy scripting language.

      • Mia@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        13 days ago

        The fact that it can be used as a scripting language doesn’t mean it’s a scripting language. You can use C++ as a scripting language as well, but it would suck.
        C# even supports native compilation nowadays, not just JIT, so it’s definitely not a lowly scripting language.

        Anyways you’ve got options. Go may also be one of them if you want GC, I forgot to mention it.