POV-Ray : Newsgroups : povray.off-topic : new C# stuff : Re: new C# stuff Server Time
6 Sep 2024 17:18:51 EDT (-0400)
  Re: new C# stuff  
From: Warp
Date: 23 Jan 2009 10:38:44
Message: <4979e484@news.povray.org>
Mike Raiford <"m[raiford]!at"@gmail.com> wrote:
> Warp wrote:

> >   Ah, so this extension can be used for operator overloading in C#?
> > Nobody told me that before.

> Operator overloading has existed since C# 1.0

  I was being sarcastic.

> I think the poster was trying to demonstrate a syntatic sugar feature 
> you may be familiar with and might like.

  And the demonstration was invalid.

  We are talking about "object.function()" vs. "function(object)", not
about "a+b+c" vs. "add(a, add(b, c))".

> Rather than using, for example:

> GraphicsExtensions.DrawButton(g, rcArea, caption);

> You could define it so you simply type

> g.DrawButton(rcArea, caption);

  I see no relevant difference to making a function so that you can write
"DrawButton(g, rcArea, caption)".

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.