Live data from Hacker News

Rhombus Language 1.0

blog.racket-lang.org

81–90 of 115 posts

Re: Rhombus Language 1.0

#81

Earlier quoted context omitted.

> A lot of people hate sexprs In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions. All that so-called "hatred" stems from unfamiliarity. People fuss about Lisps lacking static type…

I love Lisps, ML-family languages, etc. Languages like Java or Go are just painful for me to program in, and I know I’m probably in the minority there. But honestly, I think a lot of it comes down to the fact that syntax carries semantic expectations. Certain syntax makes you expect a certain model of programming: mutability, imperative control flow, objects everywhere, etc. Gleam is a good counterexample. It has an…

> syntax carries semantic expectations

True! Syntax is a signaling system. Braces and semicolons signal the C-family, so you prepare for statements, mutation, sequential side effects, and objects. Parentheses-first signals Lisp, so you expect recursion and macros. Significant whitespace signals Python. Before you have read a single semantic line, the notation has already established a prior expectation. That is real, and most language discourse ignores it.

But syntax carries more than semantic expectations. It signals era, tribe, tooling, and aesthetics too. The paren signal says Clojure, CL, Emacs, REPL, niche, old-and-proud as loudly as it says functional. Some of the aversion to parentheses originates from sociological resistance to these signals rather than from semantic concerns. Yet honestly, grokking Lisp can make a true polyglot out of a coder. It did it for me. "A Lisper" is not always someone who writes and reads Lisp full-time. Fully fluent Lisper can rationally and successfully use any other PL syntax, because they understand the semantics, even though they'd actively try optimizing the connotation and ergonomics layer, a genuine separate axis.

Re: Rhombus Language 1.0

#82

Earlier quoted context omitted.

> A lot of people hate sexprs In all my time I have never come across a single Lisper, neither in person nor online, and I know far more than a few dozens, who once grokked the REPL-driven workflow and the structural editing idioms only to later, for whatever reason, suddenly start disliking or even hating s-expressions. All that so-called "hatred" stems from unfamiliarity. People fuss about Lisps lacking static type…

This is survivorship bias. People who don't like s-expr aren't lispers. I've used Lisp before. I can read s-expr code. Unfamiliarity is not the issue. I just don't like them. I don't like Haskell/ML either, and I've written large projects in both, so it's not a Lisp-specific thing.

> I just don't like them

That is what I don't get. I have used many different languages, and often is not the syntax that I don't like - I may dislike the semantics, the runtime, the tooling, but syntax, really how? It's like "I hate Greek alphabet", even though this is a weird comparison - alphabet is a flat bag of arbitrary symbols with no structural role, so disliking it sounds incoherent by construction. I just can't ever get over "s-expressions hate", in such a way like: "What are you even talking about? There's practically zero syntax in Lisp."

Re: Rhombus Language 1.0

#83
post #4

Earlier quoted context omitted.

A lot of people hate sexprs. Even seemingly reasonable folks. I imagined they have met students that really struggle with the syntax, while grokking the concepts easily. I myself have heard "the parentheses are hard to balance" and "after a while you dont even see the parentheses" enough times that I think maybe both can be correct.

It's not unreasonable to dislike coding in s-expression syntax. It is not very readable. There's a reason the vast majority of programming languages (especially weighted by popularity) use more traditional syntax.

> It is not very readable.

That holds true only for two cases:

- For a programmer who never learned Lisp as their first language. I have met people who learned Clojure as their very first PL and they said it was fun. Later there were utterly confused about Java, Python and Javascript. Going the opposite may feel confusing and identity-breaking.

- Reading static code. In a sense, it can be a bit harder to read a wall of Lisp, say printed on paper. Lispers typically don't inspect "dead code" like that; they'd connect to the live REPL and eval expressions on the go, programming it from "inside out". With experience, it becomes easier to scan the code and mentally parse it. Lisp at that point actually gets far more readable than any other PL. For instance, Lisp code is better suited for smaller screens of smartphones - the code wraps around yet retains its readability. Try that trick with literally any other language, I can 100% guarantee - most of them would look like a huge pile of indecipherable mess.

Re: Rhombus Language 1.0

#84
post #12

Earlier quoted context omitted.

My editor balances my parentheses (Emacs Paredit). I rarely think about them. I just think structurally and the editor manages the details.

It really feels like, "when I move through the wasteland, I only focus on the path and GPS is guiding me well". For some reasons, people tend to prefer having a walk in a forest rather than in z wasteland.

> when I move through the wasteland

You got that exactly backwards. A non-lisper unavoidably has to deal with tons of syntactic and semantic clues - parens, colons & semicolons, square brackets, indentation & white-space, special chars, static type annotations, lsp servers and tree-sitter parsers. Lisp only needs two things - a [small] set of structural idioms, and a live REPL.

Re: Rhombus Language 1.0

#85

Earlier quoted context omitted.

Matthew Flatt picked “shrubbery” because it’s tree-like but not fully expanded, so it tends to be more broad/flat than deep like a tree. Hence also the term “enforrestation” when you fully expanded it. I think the Monty Python reference is just a happy coincidence.

The knights who say Ni demand a shrubbery.

More like the Knights who say Nil

Re: Rhombus Language 1.0

#86

Earlier quoted context omitted.

> I say this after researching and comparing detailed metaprogramming features across a dozen different languages. I’m very interested in this. What was your research approach? Are there resources you can recommend beyond the documentation for individual languages?

Here's the paper I wrote: https://lambdaland.org/files/2024_ecoop_type_tailoring.pdf Lots and lots of documentation, some experimentation, and asking people. :)

Thanks!

Re: Rhombus Language 1.0

#87

Earlier quoted context omitted.

This is survivorship bias. People who don't like s-expr aren't lispers. I've used Lisp before. I can read s-expr code. Unfamiliarity is not the issue. I just don't like them. I don't like Haskell/ML either, and I've written large projects in both, so it's not a Lisp-specific thing.

> I just don't like them That is what I don't get. I have used many different languages, and often is not the syntax that I don't like - I may dislike the semantics, the runtime, the tooling, but syntax, really how? It's like "I hate Greek alphabet", even though this is a weird comparison - alphabet is a flat bag of arbitrary symbols with no structural role, so disliking it sounds incoherent by construction. I just c…

That's precisely the issue: there is only one syntactic form. Everything blends together and ends up looking the same. It makes my eyes hurt.

Re: Rhombus Language 1.0

#88
post #48

Earlier quoted context omitted.

It depends on the language's indentation requirements. That can work in Python, where you never need to line things up with characters above that aren't a multiple of an indent level. But in F#, at least a few years ago when I tried it, there are times when you would need (or strongly want) to line things up with other characters. For example, this example from https://learn.microsoft.com/en-us/dotnet/fsharp/style-gu…

I did not take this in consideration, because for such code, with brackets and separators, I prefer to align the separators with the opening and closing brackets, like this: ( ... | ... | ... | ... ) or { ... ; ... ; ... ; ... }

I just checked, and lining up the | with the open parentheses does work in modern F#. I believe they revamped the indentation rules a few years back, because I definitely remember things like that not working back when. So perhaps now your idea would be feasible. However, there was definitely a time in the past when F#'s indentation rules would have been problematic for tabs, and that fact is why the F# compiler still forbids tab characters outside of string literals or comments. (And there are still indentation styles recommended, though not required, by the official F# style guidelines that would require the use of spaces. Which is another reason to avoid tabs in F# code, because they're less flexible than spaces. Usually the reason to prefer tabs is because they're more flexible, but the slightly-peculiar nature of F#'s indentation rules means tabs are less flexible in F# code.)

Re: Rhombus Language 1.0

#89
post #71

Earlier quoted context omitted.

That's why you use an autoformatter. IMO the biggest downside is that it gets awkward to do closures and inline expressions and things like that. For example Python's `lambda` and if-else expression which are super weird and special snowflakey compared to the equivalents in e.g. Rust or OCaml or even Tcl. Maybe there's a way to do it nicely; I haven't thought about it too much.

You can't autoformat broken indentation with significant whitespace since it would make the program not parse (or parse incorrectly)

I was responding to

> mismatched tabs/spaces being used for indentation between team members

Re: Rhombus Language 1.0

#90

Earlier quoted context omitted.

It's not unreasonable to dislike coding in s-expression syntax. It is not very readable. There's a reason the vast majority of programming languages (especially weighted by popularity) use more traditional syntax.

> It is not very readable. That holds true only for two cases: - For a programmer who never learned Lisp as their first language. I have met people who learned Clojure as their very first PL and they said it was fun. Later there were utterly confused about Java, Python and Javascript. Going the opposite may feel confusing and identity-breaking. - Reading static code. In a sense, it can be a bit harder to read a wall…

> For a programmer who never learned Lisp as their first language

Maybe. But I have never heard anyone say that Python is hard to read, and it's one of the most common complaints against Lisps. Just looking at them both it's hard to imagine how one could seriously believe that s-expressions are more readable. `(== a b)` is clearly worse than `a == b`. Even JavaScript programmers know that.

> they'd connect to the live REPL

Yeah I dunno this is the same cop-out Ruby programmers use to justify its lack of static typing. It's fundamentally better if you can understand code without having to run it.

Post reply on HN