Exponential operator

Michel Fortin michel.fortin at michelf.com
Tue Aug 11 04:07:24 PDT 2009


On 2009-08-10 13:56:53 -0400, Miles <_______ at _______.____> said:

> Don wrote:
>> You didn't respond to my assertion: even if you _could_ do it, why would
>> you want to? ** sucks as an exponential operator. I dispute the
>> contention that ** is a natural choice. It comes from the same language
>> that brought you  IF X .NE. 2
> 
> There are too many languages that support ** as an exponentiation
> operator, that is the reason ** is a likely candidate. Your reasoning
> seemed to be:
> 
> - Fortran is bad;
> - Fortran had ** as its exponentiation operator;
> - So, ** is bad as an exponentiation operator.
> 
> I don't care for ** or .NE., really. I don't like * as a multiplication
> operator, in fact. I'd rather have × as multiplication, ↑ as
> exponentiation, ∧ as logical and, ∨ as logical or, ¬ as a logical not, =
> as equality, ≠ as inequality and ← as assignment.

HyperTalk used to have <> for inequality, but ≠ worked too. You could 
write >= for greater or equal, but ≥ worked too. That said, having = as 
equality in a C-derived language is somewhat problematic.


-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list