Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I will never understand people bashing other languages for their syntax and readability and then saying that they prefer Rust. Async Rust is the ugliest and least readable language I've ever seen and I've done a lot of heavily templated C++




I will never understand people who bash someone's preference of a language after claiming they don't understand people who bash other languages for their syntax. Turns out language syntax preferences are subjective and most likely not black and white.

For example, Pythons syntax is quite nice for the most part, but I hate indentation being syntax. I like braces for scoping, I just do. Rust exists in both camps for me; I love matching with Result and Option, but lifetime syntax confuses me sometimes. Not everyone will agree, they are opinions.


I don't really prefer rust, but I'd take that syntax over zig, c++ templating is just evil though. Also it's not about readability, but rather the uniqueness to it.

Concur, but non-async rust is a different matter!

Yeah, I like rust but I hate async. I wish it had never been added to the language, because it has so thoroughly infected the crate ecosystem when most programs just do not need async.

> Async Rust is the ugliest and least readable language I've ever seen and I've done a lot of heavily templated C++

No, this is a wild claim that shows you've either never written async Rust or never written heavily templated C++. Feel free to give code examples if you want to suggest otherwise.


Every language i am not deeply familiar with is disgusting.

But for real the ratings for me stem from how much arcane symbology i must newly memorize. I found rust to be up there but digestible. The thought of c++ makes me want to puke but not over the syntax.


  template<auto V>
  concept non_zero = (V != 0);

  template<typename T>
  concept arithmetic = std::is_arithmetic_v<T>;

  template<arithmetic T>
  requires non_zero<T{42}>
  struct complicated {
      template<auto... Values>
      using nested_alias = std::tuple<
          std::integral_constant<decltype(Values), Values>...,
          std::conditional_t<(Values > 0 && ...), T, std::nullptr_t>
      >;

      template<typename... Ts>
      static constexpr auto process() {
          return []<std::size_t... Is>(std::index_sequence<Is...>) {
              return nested_alias<(sizeof(Ts) + Is)...>{};
          }(std::make_index_sequence<sizeof...(Ts)>{});
      }
  };
I most definitely agree.

The difference is that nobody really writes application code like that, it's a tool for writing libraries and creating abstractions. If all of the ugliness of async Rust was contained inside Tokio, I would have zero problems with it, but it just infects everything it touches

Unfortunately it makes the libraries difficult (or at least very tedious) to read. I find zig's standard library a very good reference for figuring out to do things in application space, from what I've seen it's been very clear and useful.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: