zlacker

[parent] [thread] 3 comments
1. ninken+(OP)[view] [source] 2025-12-03 16:32:14
Other than the `|var|` syntax in closures, I can't think of a single way Rust looks like Ruby. I mean that seriously, there is almost no other similarities.
replies(2): >>jjtheb+Eb >>echelo+Tg
2. jjtheb+Eb[view] [source] 2025-12-03 17:22:24
>>ninken+(OP)
i suspect the example was syntax like a.b().c().d(10)
3. echelo+Tg[view] [source] 2025-12-03 17:46:26
>>ninken+(OP)
Don't forget expressions and block expressions, and all of the Ruby-esque syntax sugar around them. How expressions work with functional methods.

I write a lot of chains with block expressions that almost look 1:1 with Ruby.

replies(1): >>nicobu+Xn
◧◩
4. nicobu+Xn[view] [source] [discussion] 2025-12-03 18:20:18
>>echelo+Tg
There's definitely some Ruby influence (closures syntax in particulary), but I think I'd argue that Rust syntax is closer to JavaScript/TypeScript than anything else.
[go to top]