little_ferris@programming.dev to Rust@programming.devEnglish · edit-24 months agoWhat are some mind blowing Rust tricks?message-squaremessage-square20fedilinkarrow-up10arrow-down10file-text
arrow-up10arrow-down1message-squareWhat are some mind blowing Rust tricks?little_ferris@programming.dev to Rust@programming.devEnglish · edit-24 months agomessage-square20fedilinkfile-text
If we were to create a Rust version of this page for Haskell, what cool programming techniques would you add to it?
minus-squaresolrize@lemmy.worldlinkfedilinkarrow-up0·edit-24 months 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-squareThinker@lemmy.worldlinkfedilinkarrow-up0·4 months 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/.