소스 검색

Update patterns tutorial

Steven Silvester 8 년 전
부모
커밋
2ee3879dc5
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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