Article View: comp.lang.misc
Article #3873Re: languages which allow the introduction of new operators
From: John English
Date: Thu, 19 Nov 1992 12:20
Date: Thu, 19 Nov 1992 12:20
24 lines
1872 bytes
1872 bytes
hrubin@pop.stat.purdue.edu (Herman Rubin) writes: : In article <1992Nov13.073809.11835@arb-phys.uni-dortmund.de> wb@arb-phys.uni-dortmund.de (Wilhelm B. Kloke) writes: : >In article <BxLxqu.96C@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes: : >You need a (possibly implicitly constructed) structure to make : >this sort of assignment possible. Defining an unary operator which : >returns a struct is possible at least in C++ and Algol68. : : I believe it is possible in Algol68, but it is not possible in C++. : C++ does not allow the introduction of new operator symbols; only new : functions. Sorry, wrong -- C++ allows existing unary operators to be overloaded provided the operand is a class object (the operator is defined as a member function of the class). It can then return anything you want it to. New operator SYMBOLS are indeed not allowed (none of that Algol 68 fun with MONADs, NOMADs and DYADs (what, no DRYADs? :-) -- ------------------------------------------------------------------------------- John English | "Yes, understanding today's complex world of Dept. of Computing | the future IS a little like having bees live University of Brighton | in your head... but, there they are..." Janet: je @ unix.brighton.ac.uk | "People who live in windowed environments Fax: 0273 642405 | shouldn't cast pointers" -------------------------------------------------------------------------------
Technical Details
Message-ID:
<1992Nov19.122018.22959@unix.brighton.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!glasgow!unix.brighton.ac.uk!jeReferences:
<Bxnupn.E27@mentor.cc.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!glasgow!unix.brighton.ac.uk!je From: je@unix.brighton.ac.uk (John English) Newsgroups: comp.lang.misc Subject: Re: languages which allow the introduction of new operators Message-ID: <1992Nov19.122018.22959@unix.brighton.ac.uk> Date: 19 Nov 92 12:20:18 GMT References: <Bxnupn.E27@mentor.cc.purdue.edu> Organization: University of Brighton, UK Lines: 24