Opened 18 years ago

Last modified 15 years ago

#95 closed defect (fixed)

getDimension() should return DimensionType

Reported by: mloskot Owned by: strk@…
Priority: major Milestone:
Component: Core Version: main
Severity: Significant Keywords: imported, phpbugtracker
Cc:

Description (last modified by mloskot)

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:1 by strk@…, 18 years ago

Resolution: nonefixed
See bug #93

comment:2 by mloskot, 16 years ago

Component: Build scriptsCore
Description: modified (diff)
Milestone: imported3.0.0
Priority: 1major
Reporter: changed from mateusz@… to mloskot
Severity: UnassignedSignificant
Summary: getDi?mension() should return DimensionTypegetDimension() should return DimensionType
Version: 3.0.0svn-trunk

comment:3 by (none), 15 years ago

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.