Re: 3rd Party Nonsense (was Re: Regular Expressions?)
Re: 3rd Party Nonsense (was Re: Regular Expressions?)
- Subject: Re: 3rd Party Nonsense (was Re: Regular Expressions?)
- From: "Michael Ash" <email@hidden>
- Date: Sun, 8 Jun 2008 06:39:22 -0400
On Sat, Jun 7, 2008 at 7:19 PM, Mark Munz <email@hidden> wrote:
> On 6/7/08, Michael Ash <email@hidden> wrote:
>
>> Of course Mac OS X does come with a regex library, it just doesn't
>> have an ObjC interface. There's more to what's available than Cocoa,
>> and one of the great things about ObjC is how easy it is to talk to
>> these pure C libraries and get them to do work for you as well.
>
> Many folks see regular expressions as a core part of today's
> frameworks (.NET, Java, Ruby, Python). ObjC, admittedly, looks a bit
> anemic in this area. There is no blessed solution and so the developer
> is required to research each of the many libraries to consider their
> pros and cons. Apple provides some libraries, but doesn't support
> linking against them (like ICU, which is used by Apple in Xcode but
> we've been told don't link against the system library).
I never cared about the lack of regex support personally, although I
understand that people do use them. As far as a blessed solution goes,
"man regex" gives you a library that's in libSystem and is part of
POSIX, so it's as supported as you can get.
> While it is always possible to drop down to the pure C libraries, I
> see that is an unnecessary step and akin to asking Cocoa developers to
> use C libraries to do string manipulation.
I do this with a fair amount of regularity. NSString is unsuitable for
working with data whose encoding is unknown or doubtful, and NSData
doesn't have any string-like functionality, so the standard C str
functions can be very useful here.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden