Talk:Quaternion type: Difference between revisions

Content added Content deleted
mNo edit summary
(new section: why so complicated?)
Line 89: Line 89:


--[[User:Walterpachl|Walterpachl]] 07:18, 15 July 2012 (UTC)
--[[User:Walterpachl|Walterpachl]] 07:18, 15 July 2012 (UTC)

==Why is it so complicated?==

This task is a nice example of why sometimes I deplore that programming languages are not as elegant as mathematics. Normally what is simple in maths should be simple in programming, but it's obviously not. I mean, quaternions are supposed to be defined as algebraic expressions of four entities 1, i, j, k such as 1 is the multiplicative neutral element and

<math>i i = j j = k k = i j k = -1</math>

I wish it was possible to just specify those identities as particular cases of a general Algebraic class or something, and be done with it. I kind of hoped that Perl 6 would allow it, but when I look at the proposed code (which did not even worked last time I checked), I can't help finding it long and ugly.

--[[User:Grondilu|Grondilu]] ([[User talk:Grondilu|talk]]) 10:27, 2 May 2013 (UTC)