Re:A Look at Crystal, the Programming Language for Humans
by bcrosby95 on Friday May 05, 2023 @11:24AM
(#35830444)
Rust is pretty expressive. Horrible syntax... that's just a subjective measure. I wish programmers would get over it, because it's a huge hindrance to trying a large number of languages out there with lots of nice things. But people are gonna be people, so it won't happen.
[ Parent
| on HN ]
Re:A Look at Crystal, the Programming Language for Humans
by capableweb on Friday May 05, 2023 @11:32AM
(#35830559)
Yeah, I agree that it's highly subjective. And I don't mean that people shouldn't chose something just based on one variable, it obviously depends. No language is perfect for every use case. Personally I use Rust for a lot of things, even though I'm more productive in other languages, but sometimes it's just a really good fit for the problem.
Pseudo-code, but this is how I see the difference in expressiveness and syntax:
3.times {
println('Foobar')
}
for i in 0..3 {
println!("Foobar")
}
Both of them makes sense though, so not a huge difference, but it's the same way in lots of ways in Rust in general.
Re:A Look at Crystal, the Programming Language for Humans
by shrimp_emoji on Friday May 05, 2023 @12:22PM
(#35831490)
Rust is spiky, like a crab.
Re:A Look at Crystal, the Programming Language for Humans
by JohnFen on Friday May 05, 2023 @04:34PM
(#35834822)
I've been learning Rust over the last few months, because it seems like a good language to have on my CV.
It's certainly a taste thing, but I am not enjoying it at all. I find it unpleasant. I think it's going to join the short list of "languages I can use but would prefer not to".
I've never learned Crystal, but if it's like Ruby, then I think I'd enjoy it just fine.
Re:A Look at Crystal, the Programming Language for Humans
by nicoburns on Saturday May 06, 2023 @09:01AM
(#35840938)
It's funny how taste works. I love writing Rust. To the point that almost all of my personal projects are now in the Rust.
Re:A Look at Crystal, the Programming Language for Humans
by kmac_ on Friday May 05, 2023 @06:17PM
(#35835779)
Ruby is fine until your large application starts to include more and more dependencies. There is no coherent API across, every library has it's own mini DSL and the mess starts to build up. Then it comes method_missing, monkey patching and strings and dictionaries passing in all the places. True horror. All Ruby's readability dissapears. Small apps look beautiful, but large ones quickly become a mess. On top of that resource utilization is atrocious.
But there are places where Ruby shines like RSpec, Rails, pry in runtime (I miss that one).
Re:A Look at Crystal, the Programming Language for Humans
by moe on Friday May 05, 2023 @07:11PM
(#35836258)
That's one of the aspects in which Crystal shines.
It retains most of the flexibility and DSL capabilities, but the type- and nil-safety allow you to leverage them without nasty surprises at runtime.
Not having to guess what a method or block returns and instead having the compiler tell you when you get it wrong makes an enormous difference.