[A, B], the value arrow is
Showlargely as a better version of
toString, ensuring that there is a sensible String representation of the object. I'd be hesitant to use it outside of debugging and logging contexts. If you need to serialize, then you probably want some sort of
Showyou can just throw together your own
HttpEncodertypeclass with similar functionality pretty easily
Showis not very useful. It can keep you from inadvertently calling
toStringon things that have no
toString, but that's it. In our codebase
toStringis always and only for debugging and
Showalways does the same thing as
toString. If you need a domain-specific stringability I recommend defining your own typeclass for it.
Ropeare ghastly, and you had to be assembling a lot before it was better than the dreaded
Stringconcat. And then at that scale, you'd be better off with a
StringBuilderif you could hide the mutation. I tried to use it a few times, and it's clever, but I could never find a place that it was the best option.
Strings and concatenate those before passing it to my parser. doing it directly from stream would be nice
case class FsString private (chars: Seq[Char])which can only be built by cats.parse or by a constructor in the object that does the verification of the content first. That should give me enough type safety for the moment. (Good to know about Literally).