gleam-lang / suggestions

📙 A place for ideas and feedback
26 stars 2 forks source link

Formatting suggestion: Drop case branches to the next line #135

Open sporto opened 3 years ago

sporto commented 3 years ago

Hi, for your consideration.

Instead of formatting

case key_result, val_result  {
  Ok(key), Ok(val) -> Ok(#(key, val))
   _, _ -> Error("")
}

Consider formatting like

case key_result, val_result  {
  Ok(key), Ok(val) -> 
    Ok(#(key, val))
  _, _ ->
    Error("")
}

When the branches are dropped to the next line they align neatly on the left. I find this easier to scan when reading code. Thanks