Comments (4)
I think a static library is overkill for this project, I like the two file drop in model. It makes it really easy to add INAppStoreWindow to a project. Ease of use is the reason to have the arc detection throughout the file instead of requiring the user to add the per file compile flag, especially for new and novice programmers.
I think libraries should do as much as possible to be as simple and as easy to use as possible, even of that means making the code slightly ugly.
The code is done and the end user doesn't have to think about arc vs non-arc, I see no reason to change it.
David Keegan
davidkeegan.com
On Jan 14, 2012, at 2:02 AM, Jonathan [email protected] wrote:
So, files can be built with ARC specifically enabled or disabled for them, in spite of the main project's settings. Also, a static library can be used to segregate ARC from non-ARC code.
Given these things, it seems pointless to have all these checks whether ARC is available. If you want
INAppStoreWindow
to be able to be built for old systems on old tools, that's totally fine. People usingINAppStoreWindow
in ARC projects can simply jigger the build settings for those files, or package it in a static library. Thoughts?
Reply to this email directly or view it on GitHub:
#31
from inappstorewindow.
Thanks for your thoughts; I disagree, however. Incidentally, code is never βdoneβ.
Whether a consumer is using ARC or not, whenever they add new code to their project, they do have to think about ARC vs. non-ARC. Since there is no expectation that all drop-in code will work under both modes, most users will end up opening up the source to INAppStoreWindow
anyway to see what they need to do to make sure it builds correctly in their project.
In the end, it's really not that hard to add a few compiler flags to the the two files that are being imported into a project. You don't save the user much time or effort by cluttering up the code with preprocessor conditionals in ways that would likely baffle ARC's designers.
That said, if you still think that it's better this way, feel free to close this issue. That the ability to work seamlessly whether or not ARC is enabled is documented in your README is certainly a mitigating factor.
from inappstorewindow.
The decision to add arc/non-arc support within the file of INAppStoreWindow
was made because when I download a library the first thing I want to do it use it, not search through the source for retains and releases. I don't care if a library is arc or non-arc, all I care about is the stability, performance, and API interface. This is why if at all possible I think it's a nice service to the end user to handle arc vs non-arc. I use a lot of submodules in my apps, some arc and some non-arc and it's bitten me a couple times where I forgot to add the compiler flags and there's an "oh yeah this is a non-arc library" moment. It's a minor annoyance but there are so many annoyances in programming that any of them that can be removed by a library author is a win in my book.
I think we are going to have to agree to disagree :)
from inappstorewindow.
Okeydoke.
from inappstorewindow.
Related Issues (20)
- when click minButton to hidden the window, then reopen,move mouse to traffic button and remove mouse, the traffic button always show RollOverImage
- Exit full screen mode in Yosemite HOT 7
- dragging to another virtual desktop is not working
- window frame.height grows from start to start if autosave name is not empty, OS X 10.9.3
- README needs update
- setMovable flag doesn't work
- Box behind title Xcode 6.1 GM HOT 2
- Yosemite double click title bar to maximum window not working HOT 1
- Cocoa pod can't find INAppStoreWindow 1.5
- bad window button positioning on Yosemite HOT 4
- TitleTextColor changes only the Window Title !
- bad way to detect yosemite
- crash, creating window from code inherit INAppStoreWindow 10.10.1 HOT 3
- Window widgets are positioned incorrectly in document-based application when showing sheets HOT 2
- Graphite system appearance appears to be ignored
- Where do I start HOT 1
- AppleMiniaturizeOnDoubleClick Isn't working HOT 2
- Window flicker when drag in the original titlebar area and move to top of the screen
- Traffic light buttons HOT 2
- Every Time At the time of Launch : NSWindow warning: adding an unknown subview: HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inappstorewindow.