Why is there no or or and ?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Feb 22 12:01:04 PST 2012

On Wed, Feb 22, 2012 at 08:35:21PM +0100, Kagamin wrote:
> On Wednesday, 22 February 2012 at 19:04:55 UTC, H. S. Teoh wrote:
> >Wait, which proposal? To replace && and || with 'and' and 'or'?
> >
> >Or my slightly extreme rant about replacing '==' with '=' and '='
> >with ':=', amongst other things?
> Well, it's hard to explain. Proposals like python's semantic
> whitespace

These come from Python users. :P

And maybe the fact that some people, for reasons unknown to me, just
can't stand the sight of delimiting blocks with '{' and '}'. It's almost
as if they get the creepy-crawlies when they see '{' and '}'. They'd
much rather deal with words like 'begin' and 'end', or Python's semantic

> or golang's "array of ints should be typed as []int in order to match
> the pronunciation sequence: array-of-ints"

That's just a native language bias. Well, it's not even that. If you
interpret 'int' as an adjective, then int[] totally makes sense. But if
you interpret 'int' as a genitive noun, then it'd be []int.

To me, I find []int ineffably ugly. Even array(int) is better than
[]int. But that's just me. Whether you write

	int x[];


	int[] x;


	[]int x;

or even

	x int[];

or any other permutation thereof, ultimately it's just a matter of
conveying three pieces of information to the compiler: the name of the
variable, the base type, and the fact that it's an array of the base
type. If you could write code in 3D, you could equally well put these
three elements in a triangle parallel to the flow of code, in which case
order wouldn't even be an issue.

So it all boils down to personal preference.

> or equality should be '='.

That's coming from math geeks like me. :P

> I don't know why, but they have something in common.

I'm not sure I know what you're referring to. What else do they have in
common, besides wanting to tweak language syntax to suit one's own

Preferences are shaped by what one is familiar with.  I'm sure if you
manage to herd enough APL programmers in here, they'd be clamoring for D
to start using APL symbols instead of this verbose procedural trash like
for-loops. :-)

Or if you herd enough Lisp programmers in here... oh wait, we already
have std.functional. :-P  The only thing missing is to replace all ;
with , (except after the last statement in a block), standardize on ()
for {}, [] and (), then rename some keywords, and it'd be Lisp heaven on


It only takes one twig to burn down a forest. It only takes one twit to
burn down a project.

More information about the Digitalmars-d mailing list