https://github.com/roc-lang/roc/issues/7946
Roc has a lot of features I'm keen to try out. I'm also curious to know practical it is for dealing with linear algebra so I was wondering if vectors/matrices are supported?
My second question concerns how Roc deals with mutation. As I understand it, the optimisation allowing for in-place mutation relies on the mutated variable not being referenced to later in the program. In programs dealing with larfe matrices, it'd be very convenient to ensure that mutation is always in place, so are there any features of the language to prevent a variable from being re-used? For example Rust has the notion of ownership.
I'm not sure roc would ever have an explicit linearity feature, but maybe it's possible to provide the info via lsp?
but maybe it's possible to provide the info via lsp?
Related older discussion:
I have replied on the github issue
Oh.... Now that we plan to have an interpreter, it is probably even easier to make a integrated tool that creates a report like scalene has. Essentially, report on, time, bytes copied, uniqueness failures, and such per line of code
That will likely help a lot
Follow up question
Thanks for the quick answer! I note the explicit desire not to reproduce Rust's ownership system, is it for the sake of simplicity?
I think yes is the answer
Last updated: Jul 06 2025 at 12:14 UTC