tdammers / ginger

A Haskell implementation of the Jinja template language.
MIT License
77 stars 13 forks source link

Use Text instead of String in parser #51

Open poscat0x04 opened 4 years ago

poscat0x04 commented 4 years ago

String is not fast nor memory efficient, Text is better in almost every case.

tdammers commented 4 years ago

The reason for this is because when I started developing Ginger, Parsec didn't accept Text as its input yet. I agree that Text would be the correct choice here, and I have a patch ready in the string-to-text branch, but I'm mildly undecided about how to handle the resulting breaking change. Options:

I'll give this some more thought, any input on the matter is welcome.

mulderr commented 2 years ago

Personally, I'm +1 on hard breakage, forgetting String altogether and a major version bump with a clear note in the changelog.