DRY properties - setting default @synthesize instead of @dynamic

  • Hello!

    It is stated in documentation that default property implementation
    setting is @dynamic.

    I can understand there are reasons for this choice, but I wonder if
    there is a compiler switch that would make the default @synthesize (at
    least in GC situation this would be quite handy) ?

    It is probably quite common situation in GC environment for one to
    just declare "@property SomeClass *ivar" and want to have its
    accessors synthesized. Currently one must re-type the property
    declaration in implementation section with "@synthesize ivar". If the
    default would be @synthesize, no duplication would occur and we could
    simply declare properties in headers and use them without any
    additional typing in most cases.

    Is there such a flag anywhere?

    izidor
  • On Nov 4, 2007, at 1:15 PM, Izidor Jerebic wrote:
    > It is stated in documentation that default property implementation
    > setting is @dynamic.
    >
    > I can understand there are reasons for this choice, but I wonder if
    > there is a compiler switch that would make the default @synthesize
    > (at least in GC situation this would be quite handy) ?
    >
    > It is probably quite common situation in GC environment for one to
    > just declare "@property SomeClass *ivar" and want to have its
    > accessors synthesized. Currently one must re-type the property
    > declaration in implementation section with "@synthesize ivar". If
    > the default would be @synthesize, no duplication would occur and we
    > could simply declare properties in headers and use them without any
    > additional typing in most cases.
    >
    > Is there such a flag anywhere?

    There is not.  File a bug, please.

    b.bum
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today