1 pointby surprisetalk7 hours ago1 comment
  • KaiLetov6 hours ago
    Borrow checker in a functional concatenative language is a wild combination. I write Rust for real-time audio and Elixir for the orchestration layer in the same project, so I deal with both worlds daily. In Rust the borrow checker saves you from data races but fights you on anything concurrent. In Elixir you just don't have shared mutable state at all, problem solved differently. Curious where Slap lands -- does it feel more like Rust's "prove to the compiler you're safe" or more like "the language just doesn't let you do the unsafe thing"?
    • surprisetalk6 hours ago
      Right now it feels a lot more like Rust, but I'm hoping to make it feel more like that smooth Elixir experience via opinionated APIs.

      If we build everything right, only library maintainers should really ever feel the borrow checker.

      For example, I've been experimenting with a new primitive that creates a sort of Agent/GoFunc thing:

        'count-channel
          ('sum let 'msg let sum 1 plus) server
          def
        0 count-channel
          1 send
          1 send
          1 send
          recv 3 eq
          free
      
      But I'm really not sure where this whole thing is headed yet :)