Re: [q-lang-users] Views and Virtual Constructors
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2007-06-28 00:20:56
|
John Cowan wrote: > What comes to mind at once is to allow a complex number to be constructed > in rectangular form and then matched in polar form, or vice versa. > At present, the rectangular form is privileged, and adding your own > view rules only makes the polar form privileged. There is no way to > make them equals. This is true, but concrete algebraic types also have only a single, canonical representation, and this is what views are supposed to mimic. I concede that there is a case for generalizing this and allow multiple views, like floating point numbers can be printed in 'fix' or 'std' formats. I must think a bit more about this... -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |