News for hackers. Stuff that matters.
Re:My ideal Rust workflow by simias on Wednesday October 27, 2021 @07:33AM (#29011804)
I can see the frustration coming from Lisp, but it's just business as usual in compiled, strongly typed system languages. Languages like Rust and C++ add insult to injury by having rather long compile times.

It's definitely a different culture but for someone like me who's on the other side of the fence it's not a big deal at all. I lean heavily onto the type checking to make sure that my code is correct and find myself running code relatively infrequently because of that. I can literally code for hours without running any code, just running "cargo check" here and there to check my syntax and typing.

If I really want to evaluate a snippet to make sure that it does what I want I generally just add a #[test] function wherever I'm currently coding. This way I have access to the full environment (dependencies etc...) and I can run it on its own with "cargo test $the_test". And I may get a bonus unit test out of it. So basically TDD without the religion surrounding it.

Re:My ideal Rust workflow by yakubin on Wednesday October 27, 2021 @09:13AM (#29012860)
> I can see the frustration coming from Lisp, but it's just business as usual in compiled, strongly typed system languages.

Not really. SML and OCaml let you evaluate selected code snippets in REPL just fine, and their compilation is fast. I'm not sure about Haskell, but I'd guess it's similar with ghci.

"Strongly-typed" is in the eye of the beholder, but the phrase "compiled, strongly-typed programming languages" generally doesn't bring to my mind C++ and Java of which this statement would be more accurate.

Re:My ideal Rust workflow by snicker7 on Wednesday October 27, 2021 @09:37AM (#29013131)
People confuse strong typing with static typing all the time. I guess this was the case here.
Re:My ideal Rust workflow by simias on Wednesday October 27, 2021 @10:48AM (#29014004)
I did do that, I feel ashamed.
Re:My ideal Rust workflow by yakubin on Wednesday October 27, 2021 @05:06PM (#29019144)
That's a good one. Brought a smile on my face.

From "What We Do In The Shadows": <https://youtu.be/yy4CN9DVPII?t=85>

Re:My ideal Rust workflow by MrBuddyCasino on Wednesday October 27, 2021 @11:50AM (#29014919)
Java IDEs let you evaluate random code fragments at runtime in the context of the current debugger stackframe. You can also change method bodies (not signatures) and have them hot-reload.

It might look like C++, but the JVM is really more like Smalltalk in nature.

Re:My ideal Rust workflow by Zababa on Wednesday October 27, 2021 @09:54AM (#29013304)
Haskell is relatively slow to compile when compared to OCaml.