Re:Never create Ruby strings longer than 23 characters
by pothibo on Wednesday December 11, 2013 @11:27AM
(#6888453)
Actually, my comment needs to be understood as an answer to the OP's title "Never create Ruby strings longer than 23 characters".
I understand that there's many places where strings are shorter than 23 characters and I never meant to say that this optimization was superfluous. I actually think it's pretty clever.
And even if you'd assume web development as the only purpose, there's a lot of strings that are shorter than 23 characters: Header for request and responses, form fields passed by the client (usernames, passwords, ...), field names passed in hashes, table and column names, template and file names, URLs or even the occasional, totally rare string in a json structure. It's an optimization with major gain and little loss.