[go-nuts] Re: strings and when to use them

2017-05-10 Thread Zachary Kaplan
t := s[30:55] > t shares the same immutable array in memory as s. See video Lexical > Scanning in Go <https://www.youtube.com/watch?v=HxaD_trXwRE> : the whole > lexer may parse the input file as one big string, without ever copying the > tokens characters : tokens are just &quo

[go-nuts] strings and when to use them

2017-05-10 Thread Zachary Kaplan
in golang, strings are immutable. thus, if i want to modify a string in place, i'll need to cast or copy each element from the string to a similar but mutable data structure. this seems inefficient for simple command line programs that take input from stdin and access it through os.Args. can so