Designing a consistent language is *very* hard

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Apr 28 13:26:40 PDT 2012


On Sat, Apr 28, 2012 at 11:42:47AM -0700, Walter Bright wrote:
> On 4/28/2012 11:10 AM, H. S. Teoh wrote:
> >But the overload of 'is' as an operator with 'is()' as an expression
> >(and its various ugly arbitrarily assigned syntaxes)? WAT.
> 
> It's not that unusual for an operator to have a binary form that is
> totally different from its unary form. Like *

So the 'is' in 'is()' is an _operator_? WAT? That's like saying the 'f'
in 'f(1,2,3)' is an operator. I thought it was the '(1,2,3)' that was
the operator that calls the function f.


> >Seriously, one of the first things I'd like to see in D3 is a
> >complete overhaul of is(). I say again, the various *semantics* of it
> >are extremely useful, and are part of what makes D rock so much. But
> >the *syntax* badly needs a total redesign. We need much saner syntax
> >assigned to each of the current uses of is(), that doesn't look like
> >it was grafted in from a PHP development branch.
> 
> I agree that the IsExpression syntax is a bit of a disaster.
> Eventually we can redesign it (D3), but there's no way we have time to
> do that now.

I'm not suggesting that we do that now. :-) But it *is* a disaster, and
when the time comes for D3, whenever that may be, it definitely needs an
overhaul.


T

-- 
Life is too short to run proprietary software. -- Bdale Garbee


More information about the Digitalmars-d mailing list