Open martijnbastiaan opened 6 years ago
I would really like this as well. Strings are just useful for debugging sometimes.
I'm willing to accept a PR. Sorry somehow missed the issue before
Now that there are trimming
and untrimming
, and text
is just an alias for trimming
, what should be added and how should the additions be named?
How about adding trimmingString
, untrimmingString
and string
?
How about a separate public module for String with functions named the same?
Sounds good to me! :)
How about a separate public module for String with functions named the same?
Maybe NeatInterpolation.String
should export a string
quasiquoter though instead of text
.
I'm thinking of the following changes:
NeatInterpolation.String
module with trimming
and untrimming
.NeatInterpolation.Text
module with trimming
and untrimming
.string
to the NeatInterpolation
module.trimming
and untrimming
in the NeatInterpolation
module as deprecated.Thus we'll be able to establish clear purposes for modules. The root one will be about exporting default quoters determined by the type they produce. The nested modules will be about providing different flavours of quoters dedicated to the type in title. We'll also be able to achieve all that without backward compatibility conflicts.
I'm just expressing the ideas for the discussion. What do you think?
I totally missed your comment after I opened this issue, until now. Your proposal sounds good to me! :)
@nikita-volkov Yeah that sounds good to me.
Indeed, backward compatibility is important to me, but that seems to be well addressed in your proposal. :)
I'm often faced with situations where I want to format a bunch of
String
s into a new multilineString
. This results in a lot ofText.unpack
andText.pack
when using neat-interpolation. Could we re-addstring
like in the first versions of neat-interprolation? Of course, without throwing awaytext
.I'm willing to make a PR.