[osg-users] [ANN] Cross-platform examples for Linux, macOS, Windows, Android, iOS, and Web

michael kapelko kornerr at gmail.com
Wed Sep 26 01:15:40 PDT 2018


Hi, Robert.

I started to use explicit `this` to simplify reading and increase
"shareability" of code:
* I don't need to rely on IDE to highlight member or local
variables/functions for me, so I can get away with simpler and faster
tools (VIM, in my case)
* I can paste such code blocks anywhere, and a reader won't need to
run IDE to know this is member or local variable/function/etc.

So far this approach looks better to me. When I see code referencing
member variables/functions without `this`, I need to know what
particular color IDE uses to tell member/local variables apart. And to
make things more complicated, different IDEs use different colors :)

On Tue, 25 Sep 2018 at 17:21, Robert Osfield <robert.osfield at gmail.com> wrote:
>
> Hi Michael,
>
> Thanks for creating the new tutorial.
>
> I had a quick look at the examples repository and am curious why do
> you use "this->" every time you access a member variable or method?
>
> Personally, as a style of coding I find it a bit odd to see it used so
> pervasively, it's unusually enough that I found myself trying to
> figure out what special reason there was in the code to do this, came
> away confused about it's intent.
>
> Cheers,
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


More information about the osg-users mailing list