an update on the text package proposal and a call for consensus
wren ng thornton
wren at freegeek.org
Tue Nov 16 22:25:26 EST 2010
On 11/16/10 3:18 PM, Duncan Coutts wrote:
> Updated proposal
> ----------------
>
> The updated proposal accepts the point that the names should be
> consistent with the List library. The substring versions are given new
> names with a suffix to distinguish them. In the break example the two
> variants are now:
>
> breakOn :: Text -> Text -> (Text, Text)
> break :: (Char -> Bool) -> Text -> (Text, Text)
>
> The full set of names and types that have changed are as follows
>
> The substring functions are now named with the 'On' suffix:
>
> breakOn :: Text -> Text -> (Text, Text)
> breakOnEnd :: Text -> Text -> (Text, Text)
>
> breakOnAll :: Text -> Text -> [(Text, Text)]
> splitOn :: Text -> Text -> [Text]
Ooh, pretty. I like those names. The *On suffix feels right for the
types, and it's short.
--
Live well,
~wren
More information about the Libraries
mailing list