Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Is it relatively easy to do this in F#? I imagine it's much easier than in Rust since the runtime has GC.
-
@MoonOwl that's what I meant* in Rust you explicitly add garbage collection to your types
-
MoonOwl1386y@beegC0de F# is an ML. ML's are garbage collected by default like many other functional languages. But what does garbage collection have to do with the expression of cyclic graphs?
-
@MoonOwl cyclic references can lead to double frees when the value is dropped. This is avoided in garbage collected languages because the runtime knows when all references to a value are gone. Maybe you don't even have to think about it in f#, I just saw "algebraic data types" and "cyclic data structures" and thought HEY Rust has this and had problems representing those!
-
MoonOwl1386y@beegC0de Ah I get you now. Sorry for misreading your comment. I remodelled the problem and solution
Related Rants
I need cyclic data structures but algebraic data types are my first love and tying the knot is impossible with the eagerness F# has. The interfaces and classes I abandoned C# for are the ones I am now writing in F#. What a job well done on my part in avoiding mutability :(
rant
immutability
f#
algebraic data types
data structures
compile-time type checking