The Rhombus Programming Language

56 points by spdegabrielle


Rhombus is ready for early adopters. Learn more and get it now at https://rhombus-lang.org/

gasche

pattern matching in all binding positions

Yes! This was one of my main pain points with Scheme, that using pattern-matching is doable via macro but is unpleasant in practice because it requires explicitly switching to different, more cumbersome binder constructs.

rs86

The macro system looks so easy to use.

brendan

I know it’s a bit superficial, but I love a most of this except the choice to use :: for type annotations.

Very cool to see the operator overloading uses relative precedences as opposed to numbers – I wish more languages did that. It was proposed for Agda at one point, and I think Swift does similar with its precedence groups.

tekknolagi

This example from the homepage does not make sense to me:

// pattern matching in all binding positions
 
class Posn(x, y)
 
fun flip_all([Posn(x, y), ...]):
  [Posn(y, x), ...]
 
flip_all([Posn(1, 2), Posn(3, 4)])
// ⇒ [Posn(2, 1), Posn(4, 3)]
flip_all([Posn(5, 6)])
// ⇒ [Posn(6, 5)]

How is it that flipping the arguments in the rest ... is inferred?