Follow

holy shit they finally added regex to swift?!

@Lady yeah they sure did

when I saw that, my first reaction was "wait they didn't have regexes in Swift already??"

@packetcat they had regexes in Foundation, but not in Swift itself and Foundation’s implementation was really built around Objective-C’s idea of a string, so it was awkward

it was basically blocked for a long time because they wanted full typechecked Regex Builders like OneOrMore(.digit) and not just strings like /\d+/, and that only stabilized in the language recently

@packetcat a lot of things in Swift are like this; because it has access to Foundation a lot of things which have existing implementations there don't make their way into the core language until they are sure they can “get it right”, even if it means making things more cumbersome for developers in the meantime

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.