3 ms·
In Haskell there is only one form of string literal. It looks like "this".
by nh2 9y ago
In Haskell there is only one form of string literal. It looks like "this".
- smitherfield 9y agoYes, 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"?