POV-Ray : Newsgroups : povray.off-topic : Visual C# .net (and XNA) first impressions : Re: Visual C# .net (and XNA) first impressions Server Time
5 Sep 2024 09:24:54 EDT (-0400)
  Re: Visual C# .net (and XNA) first impressions  
From: Darren New
Date: 12 Oct 2009 19:49:15
Message: <4ad3c07b$1@news.povray.org>
Warp wrote:
>   A header file is not really a "public interface". It's just a source code
> file like any other. The "public interface" of a class is what you put
> inside the "public" section of the class. Whatever there might be in the
> "private" section is there purely for technical reasons, and you shouldn't
> concern yourself about it and consider it effectively hidden (at least if
> you want to maintain good OOD).

Right. If you're talking about C# being too "cluttered" in its declarations 
(because they're technically in the class body, all one file sort of thing), 
then the fact that you have to visually skip the private sections of the 
class header I think would have to be accounted for in the "ease of use of 
using a .h file for documentation" arguments.

> but that doesn't make the private part any more "public".

Only if you're looking at the ergonomics of using a .h file as documentation.

>   The 'this' pointer is passed implicitly to member functions by the
> compiler. If you decide to make it a local function instead, you'll have
> to pass the object pointer explicitly as a function parameter. Otherwise
> there isn't too much of a difference, just a small difference in syntax.

Good!  I understood that right. :-)

>   (The real difference between private member functions and local
> functions is access scope.)

Yeah, I guess that's true too. :-)

-- 
   Darren New, San Diego CA, USA (PST)
   I ordered stamps from Zazzle that read "Place Stamp Here".


Post a reply to this message

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