• @[email protected]
    link
    fedilink
    English
    159 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.

  • Lambda
    link
    fedilink
    259 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?

    • @[email protected]
      link
      fedilink
      English
      69 months ago

      I have done quite a bit of C, C++, Ada, and Pascal development. I recently got into Rust. I am still getting used to Rust, but it feels a bit like someone tried to apply Ada to C++. I like the modern development environment, but I am slower writing code than I would be in Ada or C++. The one feature of Ada that I really like and want other languages to adopt is the Rep spec. I write driver code and being able to easily and explicitly identify which symbol corresponds to which bit is really good.

    • @[email protected]
      link
      fedilink
      29 months ago

      I would use Ada or Spark in a heartbeat if there was an easy-to-use, mature cross-platform GUI library for it.

  • @[email protected]
    link
    fedilink
    469 months ago

    Rust for now, by a wide margin. But I’m following other languages that I think have the potential to surpass it, including Vale (promises way more than it delivers currently), Koka, Hylo, maybe Lobster.

    • @[email protected]
      link
      fedilink
      329 months ago

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

      • JackbyDev
        link
        fedilink
        English
        39 months ago

        Java, the language so good you compile it twice!

    • @[email protected]
      link
      fedilink
      59 months ago

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

  • dohpaz42
    link
    fedilink
    English
    619 months ago
    <?php
    declare(strict_types=1)
    
    

    😏 😁

    🏃‍♂️💨

  • pelya
    link
    fedilink
    119 months ago

    C++ with -Wall -Werror, and no pointer diddling.

    • @[email protected]
      link
      fedilink
      179 months ago

      Its definitely best to try and avoid raw pointers, but even if you try really hard I found it’s not really possible to get a Rust-like experience with no UB.

      Even something as simple as std::optional - you can easily forget to check it has a value and then boom, UB.

      The C++ committee still have the attitude that programmers are capable of avoiding UB if they simply document it, and therefore they can omit all sanity checks. std::optional could easily have thrown an exception rather than UB but they think programmers are perfect and will never make that mistake. There are similar wild decisions with more recent features like coroutines.

      They somehow haven’t even learnt the very old lesson “safe by default”.

      If I wanted memory unsafety I think I would consider Zig instead of C++ at this point.

      • @[email protected]
        link
        fedilink
        29 months ago

        I recently got bitten by exactly that std::optional UB and here I was thinking 🤔 after 12+ years in the industry starting all the way back in the day with C++03 that modern C++ was supposed to make things better.😐

  • @[email protected]
    link
    fedilink
    9
    edit-2
    9 months ago

    You forgot that beauty - “undefined behavior”!

    Memory-safety can guarantee only so much safety! C++ can still blow up in your face, even with all the alleged memory-safety built into C++, thanks to all the UB traps in C and C++.

    Rust is the closest language that has no such “gotchas”.

  • @[email protected]
    link
    fedilink
    59 months ago

    Scala is the the first I used and I like it a lot. If I had more time I’d love to give ocaml a decent try but I don’t think I can get into it these days.