On 30-04-2012 20:28, H. S. Teoh wrote:
On Mon, Apr 30, 2012 at 08:09:31PM +0200, Era Scarecrow wrote:
On Monday, 30 April 2012 at 17:13:36 UTC, H. S. Teoh wrote:
It would be unwise to make major changes to the language at this
point.  Personally I'd like to see the comma operator removed, but
people keep saying it will break existing code, so that's probably
not going to happen in D2. D3 perhaps will be able to clean up a lot
of this mess.

  Then perhaps the comma operator can be pushed to the 'depreciated'
  list for a while; If it breaks anything big and important, you can
  still compile it. After a while we can see if it should be kept or
  removed. I think that's the best approach all things considered.

  Personally, I have yet to really use it outside of a for/foreach
  statement. On the other hand if it breaks something, generally it
  will become quite clear where in few the few places and require you
  to fix and update it before moving on.

Actually it's only inside for. A comma in foreach is not a comma
operator but a separator (foreach(a,b;c) is not the same as
foreach(b;c)). See, that's another case where it only causes confusion.

And I've said many times that inside a for, it really should just be
special-cased in for syntax. It should not be an operator in general.


T


Indeed. C# just special-cases it inside for.

--
- Alex

Reply via email to