Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should @synthesize be used still?

Tags:

objective-c

I'm just wondering if @synthesize should still be used even though Xcode does it automatically for properties, simply because it's been done that way for so long? Or does this mean we can all stop using @synthesize (unless you have a reason to give its instance variable a different name)?

I just want to make sure that from a professional standpoint I'm conforming to good coding practice.

like image 929
ngoue Avatar asked Jul 05 '13 23:07

ngoue


People also ask

What is the best source to use when synthesizing written information?

Primary sources are the best sources to support any synthesizing process or research paper.

What should you not do in a synthesis essay?

Remember that there should only be ONE argument per paragraph. Also, you should not do is build your argument around your sources and what they are saying. This would defeat the whole purpose of writing the synthesis essay! Your lecturer wants to read your thoughts, wants to see how well you can defend your stand.

Why is synthesizing important?

Synthesis is important in scholarly writing as it is the combination of ideas on a given topic or subject area. Synthesis is different from summary. Summary consists of a brief description of one idea, piece of text, etc. Synthesis involves combining ideas together.


1 Answers

I personally no longer use synthesize for new development only unless required (see lnafziger's comment below). The reason is because I currently develop for iOS 6, which requires a new version of Xcode, which has the capabilities of auto-including the @synthesize during compile time. If I were to do this with old code, there may still be someone in my organization that is using an old version of Xcode (i.e version 4.2) where this would cause problems for them.

So depending on if you still need to be compatible with the older versions of Xcode, this answer will vary. But if you only need to work with new versions of Xcode, you should be fine not declaring @synthesize.

like image 80
Stunner Avatar answered Nov 15 '22 11:11

Stunner