Skip to content

Interesting Way for Get Set of Fields #7

@chulchultrain

Description

@chulchultrain

I recently read the Calendar API for Java online, and something interesting to me was that they used singular get and set functions rather than getMonth/setMonth,getDate/setDate for manipulating all the fields. I think this allows for easily manipulating the fields and allowing ease of addition of new attributes to get and set.

int Get(int field);
int Set(int field, int value);

Problem: How to set something that has no easily translatable integer/enumerator.
In Calendar, this problem did not happen because months and days of the week both have a easy enumerator. Can count 1 to 12 and 1 to 7, or make an enumerable type for both.

What can I do about Pokemon names or Pokemon moves?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions