I'm kind of warming up to the idea of "what if there was no string type" or at least, what if you couldn't make them
-
-
Erlang is built that way. It... works, but it's inconvenient at times. Despite having used Erlang for much longer than Elixir, I think Elixir's handling of strings is a real improvement
-
Prolog and Haskell too. Though in the long run, you need some kind of vector type on modern CPUs to leverage their cache locality.
End of conversation
New conversation -
-
-
Hrm, I was more thinking about trying to avoid strings as an escape hatch or as part of control flow. Encourage good representations.
-
Mmm, yes. It would at least be a good rule of thumb, along the lines of goto considered harmful.
- Show replies
New conversation -
-
-
Do you use 32 bits per character to accommodate for the full Unicode range?
-
The Bel spec doesn't specify what a character is, but it would be weird if an implementation didn't.
- Show replies
New conversation -
-
-
Haskell did this and it turned out to be a particularly bad decision. Now every Haskell codebase had to spend time converting between three different string types: the default String (which is just [Char]), ByteString, and Text.
-
"Do the opposite of what paulg says" is pretty good life advice (unless your goal is to cheat people out of money I guess)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.