15

Вопрос по objective-c – Objective-C эквивалент Java-пакетов?

Error: User Rate Limit Exceeded

  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от
  • Error: User Rate Limit Exceeded

    от Jason Coco
  • Error: User Rate Limit Exceeded

    от Quinn Taylor
  • Error: User Rate Limit Exceeded

    от Arne Evertsson
  • Error: User Rate Limit Exceeded

    от Quinn Taylor
6 ответов
  • 4

    Error: User Rate Limit Exceeded )

    Error: User Rate Limit Exceeded

    Article on coding style & naming in Cocoa / Objective-C Discussion whether Obj-C needs namespaces (deleted, archive here)

  • 1

    Error: User Rate Limit Exceeded

  • 0

    Error: User Rate Limit Exceeded

     #define PruebaPaquete ar_com_oxenstudio_paq1_PruebaPaquete
    @interface ar_com_oxenstudio_paq1_PruebaPaquete : NSObject {
    

     #import "ar/com/oxenstudio/paq1/PruebaPaquete.h"
     PruebaPaquete *p = [[PruebaPaquete alloc] init];
    

     #import "ar/com/oxenstudio/paq1/PruebaPaquete.h"
     #import "ar/com/oxenstudio/paq2/PruebaPaquete.h"
    
    
    ar_com_oxenstudio_paq1_PruebaPaquete *p = [[ar_com_oxenstudio_paq1_PruebaPaquete alloc] init];
    ar_com_oxenstudio_paq2_PruebaPaquete *p2 = [[ar_com_oxenstudio_paq2_PruebaPaquete alloc] init];
    

  • 3

    Error: User Rate Limit Exceeded

  • -1

    Error: User Rate Limit Exceeded

    package private access control

    [[[[[a m1] m2] m3] m4] m5] or [a.b.c.d m1].

  • 31

    Error: User Rate Limit Exceeded

    Question 1: Objective-C equivalent of Java packages?

    Question 2: How to [name] and organize Objective-C classes?

    Naming

    If your code can't be run by other code (it's not a framework, plugin, etc. but an end-user application or tool) you only need to avoid conflicts with code you link against. Often, this means you can get away with no prefix at all, so long as the frameworks/plugins/bundles you use have proper namespaces. If you're developing "componentized" code (like a framework, plugin, etc.) you should choose a prefix (hopefully one that's unique) and document your use of it someplace visible so others know to avoid potential conflicts. For example, the CocoaDev wiki "registry" is a de facto public forum for calling "dibs" on a prefix. However, if your code is something like a company-internal framework, you may be able to use a prefix that someone else already does, so long as you aren't using anything with that prefix.

    Organization

    source/test/resources/

    My Opinion

    Class conflicts are quite rare in practice

    method conflictsespecially