www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

D - expression overloading vs operator overloading

↑ ↓ ← Bob <bob.efrei laposte.net> writes:
Would it be possible/usefull/fast to implement expression overloading 
instead of operator overloading?

What I call "expression overloading" is like:

float add_mul_func(float a, float b, float c)
written 'a * b + c' or 'c + a * b'
{
version d
	{
	return a * b + c;
	}
version x86
	{
	asm
		{
		FMULADD c,a,b
		...
		}
	}
}
Jun 14 2004
↑ ↓ → "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
This group is obsolete. You need to post on the
news://news.digitalmars.com/digitalmars.D group

"Bob" <bob.efrei laposte.net> wrote in message
news:cajkj1$30nq$1 digitaldaemon.com...
 Would it be possible/usefull/fast to implement expression overloading
 instead of operator overloading?

 What I call "expression overloading" is like:

 float add_mul_func(float a, float b, float c)
 written 'a * b + c' or 'c + a * b'
 {
 version d
 {
 return a * b + c;
 }
 version x86
 {
 asm
 {
 FMULADD c,a,b
 ...
 }
 }
 }

Jun 22 2004