#Does gleam have a `char` type
1 messages · Page 1 of 1 (latest)
No, it doesn't
Well, it sort of does, but not really
char doesn't really make sense in the age of unicode
There's a Utf8Codepoint type but it's not really what people think of as a character
I see
Nothing stopping you writing your own of course
mhmm yeah, just debating whether I want to but it seems to be handy for the derivatives so I'll probably write it up
actually dunno how to, don't think constructors can have guard clauses on them can they?
or private constructors
oh opaque types
Bingo
right now I'm trying to figure out how to wire up the creating function
how should I represent failure when the condition is met, I dunno if I wanna return a result from the function all the time
I'd just use strings, yolo
antimirov derivatives, essentially the base for a regex to NFA algo
strings are just concatted chars and states rely on single chars for letters
https://semantic-domain.blogspot.com/2013/11/antimirov-derivatives-for-regular.html
blog post Im following along
fair
Probably want to avoid all the boxing of records for something like regex