6 ms·
roc is the language most rust nerds really want but don’t realise yet. functional, modern tooling, fast enough for almost everything (~ go / swift), and without
by tkz1312 2y ago
roc is the language most rust nerds really want but don’t realise yet. functional, modern tooling, fast enough for almost everything (~ go / swift), and without the insane complexity and cognitive overhead of the borrow checker.
So excited to see it continue to thrive and grow.
- tjoff 2y agoAutomatic memory management seems like an antifeature if you look from a systems language perspective (rust). And I'd argue the borrow checker reduces the cognitive overhead.
- pjmlp 2y agoNot when one looks it from the perspective from Xerox PARC, ETHZ, DEC/Olivetti, Microsoft Research, Apple on systems programming.
- tjoff 2y agoSure, you can cherry-pick your perspective to fit your needs.
- tkz1312 2y agoMy point is more that many rust programmers like rust because it’s an ML not because of the borrow checker. Most cli apps / web services are probably better off with a high performance managed runtime (go & swift are good examples of imperative languages that have successfully made similar tradeoffs). There do of course exist many important use cases where a better c++ is actually what you want, and the complexity tax of that is worth paying.
- hardwaregeek 2y agoDoes Roc have escape hatches for mutability? That's something I value in Rust, good escape hatches from the borrow checker, so if something gets too difficult, you can just `Arc<Mutex<RefCell<T>>>` it.
- eberfreitas 2y agoI don't think so (could be wrong), but it does perform optimistic mutation on your functional code. There is a talk somewhere where Richard "demos" this.
- hardwaregeek 2y agoyeah that seems cool! I'm a little skeptical of pure functional programming with no escape hatch. I rarely need the escapes in Rust but when I do, I really do.
- bhansconnect 2y agoIt isn't "no escape hatch". It is platform dependent escape hatches. A platform can give you full access to mutation and libffi if it wants.
- lalaithion 2y agoIt should be possible to have a platform that has a mutable reference with an API like this: main = x = pf.NewRef! pf.Write! x 5 y = pf.Read! x
- rtfeldman 2y agoThat's right, although the Rust equivalent of that would be more like `Future<Arc<Mutex<RefCell<T>>>>` than `Arc<Mutex<RefCell<T>>>` - so the ergonomics would be a bit different!
- greydius 2y agoHaskell: import Data.IORef main :: IO () main = do x <- newIORef (0 :: Int) writeIORef x 5 y <- readIORef x print y
- lkhasoidyfw 2y agoI'm a rust nerd and love roc, the problem is my employer won't let me use either.