groue / GRMustache

Flexible and production-ready Mustache templates for MacOS Cocoa and iOS
http://mustache.github.com/
MIT License
1.44k stars 190 forks source link

Migration to ARC #51

Closed regexident closed 11 years ago

regexident commented 11 years ago

Hi Gwendal,

is there any plan to migrate GRMustache to ARC in the near future? Or put differently: would a stable ARC-port have a realistic chance for getting pulled by you?

groue commented 11 years ago

Hi @regexident.

No. There is no plan to move GRMustache to ARC. Here is why:

  1. This allows GRMustache to target old runtimes that are still not ARC-enabled.
  2. The fact that GRMustache manually manages its memory doesn't prevent it to run with ARC-enabled projects.
  3. GRMustache ships as a CocoaPod, and CocoaPod totally hides to ARC-enabled projects that GRMustache is written with manual memory management.
  4. GRMustache also ships as a static library, and static libraries totally hide to ARC-enabled projects that GRMustache is written with manual memory management.

The only trouble could be for users who integrate GRMustache sources directly inside their ARC-enabled project. These users have to add the "-fno-objc-arc" option in the Compile Source Build Phase of their project, and voilà the manually-managed GRMustache integrates seemlessly in their projects.

This is not an issue. Merely a disturbance in the force of the convenience field that GRMustache strives to create. Clearly not something that could justify to sacrifice older software support.

Swallow that: I did answer to issue #40, which asked GRMustache support for garbage collection (the deprecated automatic memory management that never shipped into iOS). Talk about a strong convenience field.

So clearly I won't migrate the code to ARC.

Now, you may have some other issue I did not foresee. Please dare telling it to me, and we'll find a proper solution together.

regexident commented 11 years ago

Thanks for your prompt response, @groue. :)

I was merely curious whether it would generally be worth to pursue a ARC migration fork, before I'd actually go and start working on one, which would eventually end up as a moribund pull request. ;)

Thanks a lot for GRMustache!

groue commented 11 years ago

Yes, it would be a moribund pull request, you were wise asking :-)

Actually, maintaining this lib in pre-ARC code is not easy. I'm so used to ARC now, in the apps I'm working on, that I'm always introducing memory leaks here, as soon as I touch the code :-) I have to rely heavily on Instruments.app...