9
hinst
2y

Rust ahahaah hhaahah ahah

the trait bound `std::result::Result<std::string::String, std::io::Error>: std::convert::AsRef<[u8]>` is not satisfied
the trait `std::convert::AsRef<[u8]>` is not implemented for `std::result::Result<std::string::String, std::io::Error>`

Comments
  • 3
    No Rust dev but it looks like the namespaces are the main readability killer here.
  • 4
    C++ dev feeling right at home.
  • 2
    No rust dev, but this shit is so fucking ugly. The more I attempt to get good with the language the more I hate the absolutely hideous language syntax.

    I am aware this is absolutely biased and subjective, but I keep my hopes up for Nim, for which the GC is optional and the only mistake that language has done is having syntactical whitespace
  • 1
    @AleCx04 syntactical whitespace?
  • 2
    @AleCx04 Nothing tops makefiles in that regard where using a space instead of a tab leads to errors LOL.
  • 0
    @AleCx04 take a look at Swift. It’s compiled (llvm), not garbage collected (ARC), no relevant whitespace, very strict and secure, has beautiful and clean syntax especially avoiding namespace noise, and has other nice features similar to Rust.
  • 1
    I've thought it was C++ at first. 😐

    Remind me, what does Rust have, which ideomatic C++17 doesn't?
  • 1
    @Fast-Nop: Good makefiles begin with a directive to use something else instead of tabs.
  • 4
    @iiii Memory and concurrency safety. Because, does the C++ compiler enforce idiomatic C++? No. Is there any way to even detect non-idiomatic C++ automatically (e.g. via grep), like Rust's "unsafe"? No.
  • 1
    @Fast-Nop static analyzers can detect non-idiomatic code, as far as I know
  • 6
    @iiii Yes, and you have to deal with either a lot of false positives or with missed findings. Plus that "idiomatic C++" is quite a moving target.
  • 2
    @iiii meaning, whitespace is used for block delimiting. I fucking hate it. Personal bias tho
  • 1
    @Lensflare Except that outside of the world of Apple it is a bitch and a half to use with little to know documentation and no apparent traction from the community. I do, however, like Swift and would have liked to see it take more space. The syntax is absolutely wonderful. Real nice language tbh.

    I do love Obj C tho
  • 0
    Rusts syntax is actually pretty beautiful (most of the time lol). People just hate what theyre not familar with and Rust is *very* different

    Also this is an error message, how in hell are they supposed to tell you what trait isn't implemented if they don't give you thr fully qualified name?
  • 0
    @lambda123 Yeah not really. Maybe compared to a toy language but compared to a real language like C++ it's so much nicer
  • 0
    @lambda123 True compared to c++ really doesn't mean a lot lol. But I still stand by my point that you're just more familiar with C like syntax than Rusts and that's a big part of why you prefer it

    I mean D looks like C, C++, Java, C#. They all look exactly the same and honestly not that good, which kinda makes sense since they literally use the same syntax as a 50 year old language without major redesign...

    Return type before function and type before variable is kinda ugly once you're used to the other way around. Unnessarily long keywords are kinda ugly if you're used to concise code. No if let or match as expression or traditional switch case vs match... kinda ugly

    I'm not saying you're not allowed to have an opinion. I'm just saying that Rust syntax gets a worse name than deserved because it doesn't look like any other imperative language
Add Comment