Replies: 1 comment
-
Re: This was attempted once before, see here for details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a bit of a drive-by question, but I'm curious: why are functions in the string module implemented as C functions as opposed to PEG? Would PEG be much slower?
For example, would the PEG version of
string/split
be readable? Would it be fast? It seems that I'd need to use something like that if I wanted to split a string by whitespace, as opposed to only on single spaces.In fact, it seems to be a shame that the delimeter in
string/split
cannot be a PEG. If that's impractical, it might be nice to have apeg/split
function, even if its implementation is relatively simple.For the other functions, I think it could be didactic to write them as PEGs, and quite cool if the PEG functions would be as fast.
(I realized this might be answered in the Janet for Mortals book. I only looked at the docs before asking)
Beta Was this translation helpful? Give feedback.
All reactions