Hacker News new | ask | show | jobs
by noelwelsh 683 days ago
The pitch, compared to Racket, is conventional yet still extensible syntax.
2 comments

I'll have to read about why they made the choices they made, but it reminds me of going to a microbrewery: You tell them you like simple (American) macrobrews, and they say they have just the thing. What arrives is a light lager that tastes awful because they think macrobrews beers are awful. So they made an awful beer that doesn't taste like a macrobrew.

I don't think Rhombus is going to appeal to people that are comfortable with Python, C, Java, Go, JavaScript, etc... It's got infix, but it's cryptic. It seems like a step back from StandardML or Ocaml.

Maybe there's a justification in terms of how the macros work. Maybe they're poisoning the well to make Lisp syntax more appealing. I'll try to reserve judgment, but so far I'd rather program in Scheme/Racket than this.

I don't think the Racket/Rhombus developers are really trying for adoption. They're trying to push the field forward via their research. Creating these useful programming languages is how they validate their research, but the end goal is not to grab a large share of working developers but to grab mindshare of the few developers who create the future of programming. In this they have been quite successful.
I agree they probably aren't going for world domination, but here is a nice video from Mathew Flatt where he says, "The point of Rhombus is to make Racket macro technology more accessible" and "removing an obstacle for most people":

https://youtu.be/OLgEL4esYU0

Having traditional infix operators, function calls, array subscript, and field access is a great start, but after that it doesn't look very traditional or familiar at all.

I hope they succeed, and I'll keep following their progress, but when I look at their if-statements, it's pretty non-traditional:

    if is_rotten(apple)
    | get_another()
    | take_bite()
      be_happy()
It looks like it has indentation-based grouping with vertical bars, white space, and colons implying different precedence, and that makes me have a lot more questions. I think my American macrobrew analogy above holds.

https://docs.racket-lang.org/rhombus/Notation.html

(I'm not very involved with the Rhombus project. I just post there a comment from time to time.)

I think that the macro system can handle the traditional "if X ... else ..." structure, but there is a design decision to avoid magic keywords like "else" as much as possible, like "in" in "fox X in Y: ..." Why should each construction have a different magic keyword? Can it be solved with only one thing that is shared in all construction like "|"? If you see the examples, all the other constructions with branches like "cond" that replaces "if" with "elseif" or "elif" ir whatever use "|". "match" also uses "|". This is better if you want to write macros that extend the language and have a similar structure.

(For what it's worth, I insisted in that "if" uses two "|" (one for each branch, instead of one only for the "else" part.)

> one for each branch, instead of one only for the "else" part

aut consequens, aut alternatus? ( https://en.wiktionary.org/wiki/aut#Conjunction )

Yeah, the if statements are definitely a little weird-looking to me. It seems like the goal is to allow for more traditional infix syntax while still defining most of the language using the macro system; it seems unfortunate if their macro system can't handle more traditional-looking "if (x} block; else block" conditional statements.
As someone who gets the shakes from looking at too many parenthesis I think it's a great step in the right direction.

A few weeks ago I went through the "GUI demo" source, and it's not bad. Of course just reading it doesn't tell much about what's the IDE support, how easy it is to figure out the arguments/types. (But it's rhombus/static, which is encouraging!)

https://github.com/racket/rhombus/blob/master/gui_demo.rhm

a.k.a. Python-like with macros