Struct versus Class

From FetchWiki

Jump to: navigation, search


[edit] Status

  • Problem described.
  • Solution suggested.

[edit] Problem description

At this moment, we do not distinguish between structs and classes. An interesting difference is the default access qualifier. In a struct, attributes are public by default, while in a class the default is private. As we identify structs as classes, the default always public.

[edit] Relevance

Resolving this helps us in the disambiguation of potential attribute parents.

[edit] Suggested Solution

Distinguish structs from classes, adapt the default access qualifier accordingly. Exploit this information during attribute parent resolution (and possibly for methods as well).

Personal tools