help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check for redundancy


From: Yuri Khan
Subject: Re: Check for redundancy
Date: Fri, 3 Jul 2015 09:36:13 +0600

On Fri, Jul 3, 2015 at 5:37 AM, Robert Thorpe
<rt@robertthorpeconsulting.com> wrote:

> It's also useful in MS Window programming where everything is some kind
> of handle.  Even then though, I would only use it for the user
> interface, not every variable as you say.

In early Windows programming, all handles were just void*, which made
them all seemingly different for the programmer and identical to the
compiler.

Nowadays (since ≈2002?) the SDK defines a strict mode, where different
kinds of handles become pointers to different tag structure types:

struct tagWND;  // declared but not defined
typedef struct tagWND* HWND;

With a sufficiently strongly typed language and compiler, the
programmer is protected against accidentally using a HWND as a
HBITMAP.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]