News for hackers. Stuff that matters.
Re:Announcing Rust 1.20 by lederhosen on Thursday August 31, 2017 @05:44PM (#15144224)
In Haskell it is easy, you can not create cyclic data structures ;-)
Re:Announcing Rust 1.20 by lomnakkus on Friday September 01, 2017 @12:23AM (#15146099)
Counterexample:

    $ ghci
    GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
    Prelude> let ones = 1 : ones
    Prelude> take 50 ones
    [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
You can take as many as you like. (The 'ones' list contains a tail which links back to its head, producing an infinite list.)

Obviously, this is a trivial example, you can do much more interesting things with mutually recursive bindings.

Re:Announcing Rust 1.20 by tene on Friday September 01, 2017 @01:31AM (#15146357)

    let cycle = "cycle " ++ cycle
Re:Announcing Rust 1.20 by wtetzner on Thursday August 31, 2017 @11:48PM (#15145984)
Cyclic data structures can be created in Haskell, in large part due to laziness.
Re:Announcing Rust 1.20 by lederhosen on Saturday September 02, 2017 @06:00PM (#15158449)
If you see data structures as cyclic, it is not "in large part due to laziness", but _only_ due to laziness. If you look at the memory representation I think (but I am not sure) there will be no cycles between allocated objects. Only a thunk.

Using strict data types, I think you agree that cycles can not be created. Non strict data structures I agree can be seen as cyclic, but I prefer seeing them as infinite.

Re:Announcing Rust 1.20 by tome on Thursday August 31, 2017 @06:27PM (#15144508)
Huh? Sure you can.