Hacker News new | ask | show | jobs
by boitiga 35 days ago
Honestly Rust is an UGLY language. For whatever powers it possesses in memory safety, its cryptic symbology is reminiscent of assembly.

This is a problem when language designers are mathematicians and don’t understand typographical nuance and visual weights.

6 comments

If I was forced to write it myself, then I'd agree, I'd use Clojure all day before Rust, because it's such a chore to write, edit and read.

The whole "with AI" kind of reduces my hate for Rust though, and increases the appreciation for how strict the language is, especially when the agents themselves does the whole "do change > see error/warning > adjust code > re-check > repeat" loop themselves, which seems to work better the more strict the language is, as far as I can tell.

The "helpful" error messages from Rust can be a bit deceiving though, as the agents first instinct seems to be to always try what the error message recommends, but sometimes the error is just a symptom of a deeper issue, not the actual root issue.

If I was forced to write it myself, i would love to keep writing ruby. What a wonderful language. I dont write ruby anymore, mostly using golang and python.. but ruby still a joy.
Have you looked at Kotlin? I looooved Ruby. But now I've come to a conclusion that a stronger type system is worth it: in teams, for LLMs, for my own sanity.

Kotlin is basically a Ruby (OO first with lots of FP goodness) with a serious type system. And where Ruby uses C-written libs in some places, with Kotlin one uses Java written libs from time to time.

See http4k for a nice implementation of Rack + a lot of goodness from Rails, without becoming a framework (it's just a lib).

> Have you looked at Kotlin?

Yes Kotlin is nice too. Type systems are important and helpful. Performance is a must too.. that's why we all in some point left ruby... but ruby makes you happy.. Maybe because my experience with Kotlin is restricted to Android, i didnt love that that much. Same with Crystal or even JRuby.. it's almost ruby, but not really.

It’s funny I got downvoted immediately as expected.

I mean God help us should a crustacean try to understand the merits of my claim.

“Oh he’s saying something negative about rust…” Downvote!

I think with AI the language should still be readable. Humans need to be able to understand what’s going on!

Hardly surprising, you give a strong opinion but you don't actually back that up by any arguments, that stuff tends to be downvoted here. Add some proper reasoning and making it clear why you think as you think, and people will stop downvoting :) Also, stop caring about magic internet points, they don't matter and people downvote random stuff sometimes.
You’re right on both counts.

However, if I link to gestalt theory of psychology; The Elements of Typographical Style by Robert Bringhurst; and The Primer of Visual literacy by Donis Dondis, folks will undoubtedly NOT read it and still downvote because they have been in Rust code and so have naturally become accustomed to its monstrous appearance. :)

Perhaps I should design a language that is typographically sound—something like brainf*ck haha

I really don't get the complain about Rust's syntax, it's almost identical to TypeScript's and nobody complains about TypeScript Synthax being ugly …

(Yes, I know the 'a lifetimes are a bit weird, and that's not something that exist in typescript, but that's also not something you use everyday in Rust either.

Why would the language being typographically ugly matter? Python's pretty, but it hides a lot of functional nuance behind that. Rust is terse, but it's also expressive in its terseness.

If you want to give it a fair shot, it does take some time to get used to, coming from something like Python or Ruby. I won't deny that. I've found that using LSP-assissted semantic syntax highlighting helps, for me, on the typographic front.

I don't think typographic design is a key consideration in most languages' designs, though, and I don't think it should be. The main thing I look for is consistent, relatively predictable rules around the syntax, as far as that layer of language choice goes.

I would rather have people running for languages like D, but the automatic resource management stigma is high among certain classes of developers.
What aspects of Rust do you find ugly? Can you provide three examples?
To me it looks clean and concise
I’m curious why? Also I’m curious how long you have programmed in Rust?
If you come from c++ it tends to feel clean imo.