[–] 4 points 1 year ago (1 child)

I went the "only let introduces bindings" route, and I'm pretty happy so far:

if (left.next(), right.next())
... is (Some(let l), Some(let r)) { /* use l and r */ }
... is (Some(let l), None       ) { /* use l       */ }
... is (None,        Some(let r)) { /* use r       */ }
... is (None,        None       ) { /* use nothing */ }
}
  • source
  • parent
  • context
  • [–] 1 point 1 year ago

    Some of the earlier ones remind me of C#'s records. Were they inspired from them?

    No, that stuff is much much older.

    Named parameters are problematic because of parameter names becoming significant to the API. See Python’s * and / in parameter lists (like def foo(a, *, b) for example).

    I think the name problem is overblown, you can always have an annotation to facilitate name changes.

  • source
  • parent
  • context
  • [–] 1 point 1 year ago* (last edited 1 year ago)

    This exactly what I described in 2021, so I'm pretty happy seeing other languages also going this route.

    Sadly, they also don't have a solution for the follow-up question that naturally falls out if this approach -- how to "unbox" generic types such that they can be used directly and don't need some additional type to hold it, i.e.

    union Option[T] of T, None // None defined elsewhere
    

    instead of

    union Option[T] of Some[T], None // Some & None defined elsewhere
    
  • source
  • [–] [S] 1 point 1 year ago* (last edited 1 year ago)

    Rust devs sometimes seem to be an incredibly insecure and angry crowd.

    I mentioned elsewhere how I had very good outcomes from looking at Rust and asking "how can this be done, but simpler?" in my language, listing a few examples ... and they were absolutely livid about it.

  • source
  • parent
  • context
  • [–] 38 points 1 year ago* (4 children)

    I would be deeply uncomfortable to work in an environment where one couldn't ask the author of a change for insights or rationale, because the author let some machine write it and therefore lacks any deeper understanding.

  • source
  • parent
  • context
  • [–] 4 points 1 year ago*

    I think it's due to multiple reasons, and the threshold of rejecting the course of GitHub/Microsoft/the USA seems to have reached a level where GitHub stopped being the "default" place to be for a number of projects already.

    And if you are at a point were you need a Codeberg account anyway already, why not move your own projects there (or use it for new ones)?

    Not to mention, the Forgejo project is at a stage were it feels like your bug report/feature request/contribution has an actual impact.

  • source
  • parent
  • context
  • view more: ‹ prev next ›