Skip to content

Comment on Why Go Can't Tryparent

Comments

Haven't jumped into rust for a while. Had to read up on what .unwrap() does.

   x, _ := 
With the topic of .unwrap() _ is referencing an ignored error. Better laid out as:
  func ParseStringToBase10i32AndIDoNotCare(s string) {
     i, _ := strconv.ParseInt(s, 10, 32)
     return i
  }
Un-handled errors in Go keeps the application going were rust crashes .unwrap().

Ignoring an output data value or set is just fine. Don't always need the key and value of a map. Nor a y axes in vector<x,y,z> math.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.