3 ms·
Yes, but to get a reasonable string implementation you need {-# LANGUAGE OverloadedStrings #-} plus lots of other ceremony. (There's only one form of strin
by smitherfield 9y ago
Yes, but to get a reasonable string implementation you need
{-# LANGUAGE OverloadedStrings #-}
plus lots of other ceremony.
(There's only one form of string literal in C++ too; the "s" and "sv" suffixes shown above are operators, not part of the literal).
- fusiongyro 9y agoAdding to your point, there are two string types you should use in Haskell (ByteString and Text) and neither of them are the type you get from an unadorned string literal (absent OverloadedStrings and some expectations).
- lomnakkus 9y agoWhat do you mean by "lots of other ceremony"?