Can C++ Compete with Rust for Web Development?

Поделиться
HTML-код
  • Опубликовано: 20 сен 2024

Комментарии • 20

  • @codingwithmat
    @codingwithmat  8 месяцев назад +1

    Let me know which frameworks you have used! Keen to try out new C++ ones on stream, Oat++ was a little complicated :(

    • @destiny_02
      @destiny_02 8 месяцев назад +5

      Crow is very simple to use, single header, very fast.

    • @xD-saleem
      @xD-saleem 7 месяцев назад

      @@destiny_02 im using Pistache instead. crow didnt work for me.

    • @nenadjovanovski1461
      @nenadjovanovski1461 4 месяца назад

      Love the comparison, would love to hear your opinion on a few more libraries, like crow, drogon, boost beast (if i remember correctly), treefrog, as well as axum for rust, maybe zino, silvo etc.

  • @heavymetalmixer91
    @heavymetalmixer91 8 месяцев назад +8

    If a C++ framework is drowned in macros, chances are it's probably made mostly by C developers rather than C++ developers.

    • @codingwithmat
      @codingwithmat  8 месяцев назад +1

      Agreed, I dislike the overuse of macros. So Oat++ wasn't the best experience for me, but it was cool nonetheless :)

  • @2dapoint424
    @2dapoint424 2 месяца назад +2

    Why did you not use Crow instead of oat++? Is Oat++ better than crow?

    • @codingwithmat
      @codingwithmat  2 месяца назад +1

      Nah I'm sure Crow is better to use from an API pov, I picked Oat++ because it's also a very popular one. Oat++ and Crow are fairly suitable, but they have different APIs. Crow's happens to be simpler

  • @aogposton
    @aogposton 6 месяцев назад

    You gotta do another one of these with dragon. For a while, dragon (with raw sql as opposed to an ORM) was the fastest web framework. It's not listed on the benchmark site anymore, but I suspect it's still the fastest framework.

    • @codingwithmat
      @codingwithmat  6 месяцев назад +1

      Thanks for watching my dude! I'll definitely give it a try. Drogon did seem like the easiest C++ framework to work with too, unfortunately I was too deep into the Oat++ research to switch last minute :(

  • @AnotherDevelopersWorld
    @AnotherDevelopersWorld 8 месяцев назад +2

    Nice Video!

  • @steveoc64
    @steveoc64 8 месяцев назад +4

    C++ has a hugely successful installed base already, as does C
    Rust is narrowly focused, has very poor take up compared to its peers, and doesn’t play well with non-rust code
    The only thing keeping it alive is the marketing machine
    There are very few experienced devs who have any interest in rust

    • @codingwithmat
      @codingwithmat  8 месяцев назад +4

      I agree and disagree with some points. C++, C, Java, Golang, etc, all have better uptake, perhaps due to all of them being older as languages.
      Rust is gaining some popularity recently, and not due to marketing - StackOverflow surveys shows that developers do actually enjoy the language once they get exposed to it.
      Indeed, there are very few experienced Rust devs. This is due to the lack of jobs in Rust, so it's harder to get true experiece with the language.
      As a C++ dev (who still prefers it to any other language), I can definitely say it's worth learning Rust as it may bring some new ideas to your development habits. In addition, it brings entire new concepts that just haven't appeared in other languages like the borrow checker, lifetimes - these things make you think twice when writing C++ code that needs objects to be passed around. I often think of whether my C++ code would pass the borrow checker, or lifetime checker in Rust, leading me to write less buggy code :)
      Thanks for watching and I hope you stick around for future live streams + videos!

    • @steveoc64
      @steveoc64 8 месяцев назад

      @@codingwithmat yep, subbed and definitely hanging around for more.
      Personally I don’t see anything really new in rust. The ownership model may be unique in the raft of newer languages, but it’s an old idea that first started being used in the late 1960s / early 70s. It is a form of GC that was tried, but eventually overtaken by mark and sweep GC. It’s definitely not new or unique in that regard.
      Stack overflow surveys certainly do show interesting results ;) they are slightly open to ballet stuffing, so who knows. Can’t say I know anyone personally that cares enough about the popularity of their tools to bother voting there ;)
      I think the issue with rust jobs is that rust projects want devs with good experience at low level work, but a lot of (most ?) experienced devs are not all that interested in Rust, and would rather not use it if they had half a choice.
      Anecdotally, the ppl most interested in rust seem to have come in via python / js, and don’t have much experience in low level programming. Older C/C++ devs on the other hand don’t have the same enthusiasm for rust it seems. Dunno. Maybe yes maybe no.
      In contrast.. when go hit 1.0, a big take up from guys with a lot of background in C, and then shortly after you see many killer apps landing - like docker, kubernetes etc.
      Rust has been around longer, and nothing much to show in the way of big scale killer apps ? Not a good sign. Was originally launched as a way to build a better Firefox, but that original project has faded away. Looks like most of the take up now is using it for webdev backends.
      Rust in Linux kernel drivers is a thing. But that has now triggered a backlash, and they are seriously discussing using C++ now in the kernel because it makes more sense than rust. Ouch!
      Even zig, which is years off 1.0, has significant contributions already if you count bun and tiger beetle. Same with pony - very obscure, but has an established killer app.
      I think rust might have missed the boat already. Will it even survive given the emergence of improved C++ stds, C23, zig, carbon, Odin, etc ?

    • @DataPastor
      @DataPastor 2 месяца назад

      This. Plus, cpp2 0.8 will be released soon, together with a permissive licence.

  • @pup4301
    @pup4301 7 месяцев назад

    Did you optimize the rust binary? You can most definitely reduce the size by alot if you were to raise the binary optimization level.

    • @codingwithmat
      @codingwithmat  7 месяцев назад +2

      Just `cargo build -r` was used. Same default compilation with C++ too (no extra optimisations)

  • @brockdaniel8845
    @brockdaniel8845 5 месяцев назад +1

    7:07 ABI ?

  • @thinkGrey_
    @thinkGrey_ 8 месяцев назад

    Really good 👍

    • @codingwithmat
      @codingwithmat  8 месяцев назад +1

      Thank you for watching! Yeah the production value for this video was increased quite a bit :D Hope you enjoyed the Rust vs C++ content !