Removed reliance on `stringWithUTF8String:` #1

Merged
merged 1 commit into from Nov 19, 2013

Projects

None yet

4 participants

@hypercrypt
Contributor

Hi, this looks awesome, but I am not quite sure why it is built on top of -stringWithUTF8String:.

I have modified it to remove the swizzeling. The macro syntax is the same and all unit tests still pass.

Am I missing something?

@calebd
calebd commented Nov 17, 2013

Thank you! I was wondering why we needed to rely on stringWithUTF8String: at all given that everything runs through a macro anyway. This makes me feel so much better!

@dbachrach
Owner

Thanks for this. I was playing with boxed C strings as the mechanism to recognize literals and then just created the $ macro to simplify things.

[(id)@("55b") isTooLarge];

to

[$(55b) isTooLarge];

But you're right. Given that it's all going through a macro, you can just eliminate the entire boxed string implementation. I think it was a cool exploration and I hope my post on it is interesting, but this PR makes OCUDL usable in production. Will take a look and merge this in real soon.

@gvieira
gvieira commented Nov 17, 2013

Hey,

Just did almost the same thing and it was about to create a PR (2142c8f). So, +1!

@hypercrypt
Contributor

I had a feeling that's what happened ;) This is really cool!

@dbachrach
Owner

@gvieira Awesome. Will take a look at that too.

@dbachrach dbachrach merged commit e56f683 into dbachrach:master Nov 19, 2013
@dbachrach
Owner

I've updated OCUDL In Depth to address this change.

@hypercrypt
Contributor

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment