:+1
That's a good point. I have myself experienced problems calculating mean
when periodicity is not taken into account.
As for dimensionless quantities: I see no issue assigning a type to them
(other than a potential re-design of the Julia libraries... gross). In
fact, I expect alot of convenience with *typical* use cases.
The real question is how much programming overhead is required to use these
types (assuming the compiler does the grunt work reducing the *performance*
overhead).
For example, you can easily/quickly obtain "typeless" values with "val":
abstract Unit
val(x::Unit) = x.v
abstract Angle <: Unit
immutable type Radians{T<:Number} <: Angle
v::T
end
unitlessVal = val(Radians(pi))
(See:
https://github.com/ma-laforge/testcases/blob/master/units_test/units_test_angles.jl
)
On Monday, March 2, 2015 at 8:14:27 AM UTC-5, Yuuki Soho wrote:
>
> One advantage of having a Radian type would be to have circular statistics
> built-in, mainly mean, var, std or cor. Other languages usually have
> special functions or packages for that (circmean).
>