Explorar el Código

Update patterns tutorial

Steven Silvester hace 8 años
padre
commit
2ee3879dc5
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      tutorial/patterns.md

+ 2 - 1
tutorial/patterns.md

@@ -106,7 +106,8 @@ Prefer an `Array` for:
 - A return value is the result of a newly allocated array, to avoid the 
 extra allocation of an iterator.  
 - A signal payload.
-- A public attribute that is inherently static.
+- A public attribute that is inherently static, but use `.slice()` to
+make sure the internal value cannot be mutated by the consumer.
 
 Prefer an `IIterator` for:
 - A return value where the value is based on an internal `Vector` but the