• 0 Posts
  • 3 Comments
Joined 2 years ago
cake
Cake day: September 24th, 2023

help-circle
  • I agree. The syntax for useless error handling is indeed more verbose than Rust (a whole if block Vs a single ?) but the difference when you actually do proper error handling and add a useful context message is much smaller.

    You could argue that’s a good thing because it encourages writing proper error handling code.

    I’ve seen plenty of Rust code with only ? which leads to really bad error messages. I’ve seen Rust errors in complex programs that are literally just Could not open file or directory - no context, no filename. Go definitely has better error messages on average.

    That said I still prefer Rust’s error handling, and writing Rust in general.


  • mainly because of rails magic though whenever I look at it. Convention over configuration hurts my brain some days.

    I agree. Ruby has waaaay too much magic which makes it impossible to follow (dynamic typing makes it even worse).

    And convention over configuration definitely has huge advantages in terms of consistency and terseness, but it is also way less discoverable because instead of a config file say “the stuff is in foo” you have to already know that everything in foo is automatically treated as stuff.

    I often wonder if it would be crazy to have both: you have a configuration file that says where things go, but the values must be set to constant well-known values. Sounds kind of crazy so I’ve never done it but you would get consistency and discoverability. I expect people would complain about the redundancy though.


  • I would not recommend Julia or Clojure. Go is a decent shout… Though it really depends on what you want to make. Games? Web sites? Automation? Etc.

    If web sites then Go is an excellent first choice. You will need to learn HTML/CSS at least too and maybe JavaScript.

    I learnt Go from Go by Example which was good, though it does assume some knowledge. Go is a nice simple language to start with.