Opened 18 years ago
Last modified 15 years ago
#95 closed defect (fixed)
getDimension() should return DimensionType
Reported by: | mloskot | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | main |
Severity: | Significant | Keywords: | imported, phpbugtracker |
Cc: |
Description (last modified by )
I'd suggest to provide better type safety in getDimension() functions. Now, it returns unsigned int or int type. But in fact, it returns values equvalent to enumerators from Dimension::DimensionType enum.
So, why not to return Dimension::DimensionType itself instead of int?
Example:
Dimension::DimensionType getDimension() { return Dimension::P }
Digression:
Java was a condemned language related to this feature until latest Java 5.0. Just now Java 5.0 provides type safety related to enums. In previous version there were no real enums. So, I'd suggest to not to continue this condemnation in C++.
Change History (3)
comment:2 by , 16 years ago
Component: | Build scripts → Core |
---|---|
Description: | modified (diff) |
Milestone: | imported → 3.0.0 |
Priority: | 1 → major |
Reporter: | changed from | to
Severity: | Unassigned → Significant |
Summary: | getDi?mension() should return DimensionType → getDimension() should return DimensionType |
Version: | 3.0.0 → svn-trunk |
Note:
See TracTickets
for help on using tickets.