Why is there no or or and ?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Feb 22 15:57:53 PST 2012


On Wed, Feb 22, 2012 at 11:15:35PM +0100, F i L wrote:
> >It does not serve any purpose to insist on closely similar
> >notations.
> 
> So let's make '+' be '$' and '-' be '+'?

Sounds like an esolang (http://esolangs.org/wiki/Main_Page) :)

Maybe I should invent one. I'll call it EsoD, for Esoteric D (or Evil
Strain Of D). Syntax is exactly the same as D, except that instead of
(), [], and {}, we write ~!, @#, and $%, respectively, and all keywords
are spelt backwards. Addition is denoted ^, multiplication &,
subtraction *, and division (. Assignment is denoted ), equality is -,
and field access {. Lists are delimited by +, and statements end with =.
Since } isn't used for anything, we'll use that instead of @ for
properties.

So for example, here's a function that computes the average of an array:

	}efas erup tsnoc a f~a+z!~ni z@# b! $
		a c)0=
		hcaerof~d=b! $c^)d=%
		nruter c(b{htgnel=
	%

Here's an example of how to use it:

	tropmi dts{oidts=
	diov naim~! $
		nletirw~f|~laer!~@1+2+3+4+5#!!=
	%

If this looks hard, don't worry, once you are past the initial learning
curve, it will all become crystal clear to you. ;-)


T

-- 
Indifference will certainly be the downfall of mankind, but who cares?
-- Miquel van Smoorenburg


More information about the Digitalmars-d mailing list