@[email protected] to [email protected]English • edit-27 hours agoWhat are some mind blowing Rust tricks?message-square23fedilinkarrow-up135arrow-down10file-text
arrow-up135arrow-down1message-squareWhat are some mind blowing Rust tricks?@[email protected] to [email protected]English • edit-27 hours agomessage-square23fedilinkfile-text
If we were to create a Rust version of this page for Haskell, what cool programming techniques would you add to it?
minus-square@solrizelink4•edit-27 hours agoI’d like to see a Rust solution to Tony Morris’s tic tac toe challenge: https://blog.tmorris.net/posts/scala-exercise-with-types-and-abstraction/index.html His rant about it is here: https://blog.tmorris.net/posts/understanding-practical-api-design-static-typing-and-functional-programming/ I did a Haskell GADT solution some time back and it’s supposed to be doable in Java and in C++. Probably Rust too. I wonder about Ada.
minus-squareThinkerlink5•4 hours agoThis could be done almost trivially using the typestate pattern: https://zerotomastery.io/blog/rust-typestate-patterns/.
I’d like to see a Rust solution to Tony Morris’s tic tac toe challenge:
https://blog.tmorris.net/posts/scala-exercise-with-types-and-abstraction/index.html
His rant about it is here:
https://blog.tmorris.net/posts/understanding-practical-api-design-static-typing-and-functional-programming/
I did a Haskell GADT solution some time back and it’s supposed to be doable in Java and in C++. Probably Rust too. I wonder about Ada.
This could be done almost trivially using the typestate pattern: https://zerotomastery.io/blog/rust-typestate-patterns/.