Need help?
<- Back

Comments (20)

  • hingler36
    I can see how multiple mutable references is fine in a single-threaded context, but surely this would cause UB in the multi-thread context?
  • Panzerschrek
    I am pretty skeptical about the whole idea about adding such exceptions to the single mutable reference rule. It may be safe to share references to simple structs in terms of raw bytes access, but as long as some non-trivial invariants are involved, it can be a source of nasty bugs.In my programming language I generally don't allow having more than one mutable reference to a variable. The only exception is when two references point to different elements of structs/tuples. This gives some flexibility without sacrificing correctness.
  • Panzerschrek
    > Because of this, Ante code can safely have multiple mutable borrow references to the same struct at the same time.I doubt it can work in multithreaded code. Allowing sharing mutable references (even to simple structs) means race conditions, temporal inconsistency between different struct fields and even incorrect read results for basic integer types (if the target CPU can't atomically read/write values of types like u64).
  • anon
    undefined
  • teo_zero
    What if I omit the "uniq" keyword? Is it still valid code, just not protected by the compiler from union types changing underneath?
  • sureglymop
    What about Vale? Is this a rename of it or something new?
  • Xeoncross
    I'm really looking forward to the next generation of languages. Not only are the old 90's languages like Java, PHP, and JavaScript now actually doing things correctly. The new languages like Zig, Go, Swift and Rust continue to figure out new ways of trying things like generics. Spinoffs like V, Ante, and others are perfect testing grounds.
  • HexDecOctBin
    What is "stable shape"?
  • FpUser
    >"I have to admit, this is beautiful"Terse it is, beautiful it is not (well my version of beautiful that is - easy to read and understand). this is not to diminish the language.
  • aaronyi
    [flagged]