At present you can write: 1i // same as plain 1
however this conflicts with 1i // complex number (0,1) There's no conflict with actual complex numbers based on floats, since 1.0i is currently not defined. Still, it is a bit confusing having 'i' meaning 'int' for an integer lexeme but 'complex<?>' for a floating lexeme. However writing dcomplex (1.0,1.0) is quite a mouthful! You can now write dcomplex 1 for the canonical injection. We could perhaps provide imag 1.0 for an imaginary value, but dcomplex 1.0 + imag 1.0 is messier than 1.0 + 1.0i However the situation is made worse if we provide quaternions: 1.0 + 1.0i + 1.0j + 2.0k Both this case and the plain complex one require appropriate embeddings. Even worse: 2.0 * e ^ (i * theta) looks more like a calculation than a complex value in polar form. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language