1. 24

  2. 7

    Neat, but is it really worth the trouble of being a Surprising Syntax Detail instead of just a method?

    1. 1

      It’s hard to draw a clear line. :-)

    2. 5

      another weird bit with strings, "".encoding is utf-8 but String.new.encoding is ascii

      1. 4

        Oh, I recognize those! Those methods are called .diverge() and .snapshot() in E and Monte. The idea is that it can be hard sometimes to know whether one is working with an immutable (DeepFrozen) collection, or its mutable variant, but .diverge() will produce a (shallow) copy either way, and similarly, .snapshot() will produce an immutable version.