Closed
Description
LLVM uses a lot of StringRef and ArrayRef. They are really handy and efficient, being implemented with just a pointer and size.
Some uses of it are safe (call a function with StringRef to a string that outlives the call), some unsafe (StringMap return a StringRef).
Go makes this kind of things builtin to the language (http://golang.org/doc/effective_go.html#slices), maybe we could do the same.