Talk:Handle (computing)

message: More details on handle are needed....
:I think the section on handles should be eventually moved to their own page.  There's an argument against this — pointer, smart pointer, and reference are all separate and vaguely redundant, and handle would only add to the mess.  I'm going to leave it for now, because I usually stick to FP and prefer not to mess with this stuff. :) --Mgreenbe 23:17, 8 December 2005 (UTC)
thread_title: Getting a handle on handles

message: It’s never been my impression that handles are smart pointers. Sometimes handles aren’t pointers at all. Even when a handle is a pointer, it can be harmful for a programmer to think of it that way since that brings the temptation to dereference the pointer and dig around at what it’s pointing at. A handle is meant to keep those kinds of details abstract.
There are other kinds of handles that have nothing to do with the memory manager. Those include file handles, window handles, mutex handles, search handles, etc. In this way, the notion of a handle is a kind of pattern: All those kinds of handles represent different things, but they’re all there to prevent (or relieve) the program from having to deal with the nitty-gritty details of the underlying system.
Smart pointers don’t do that. Smart pointers don’t really hide anything from the program. They lessen the burden of some of the bookkeeping involved with pointers, but they still provide access to the same memory that would have been available with a conventional pointer.
Although handles for memory may have fallen out of favor lately, they’re definitely still going strong for other uses, especially on Windows. I suspect they still get frequent use on other operating systems.
If anything has caused other kinds of handles to fall out of favor, it’s classes. Instead of file handles with API functions that accept file handles for their first parameters, we instead often see File classes with various methods to act on underlying disk files.
To describe a handle as a smart pointer, I’d want to know what kind of “smarts” the handle supposedly has. This article doesn’t address that, and I doubt it can. --Rob Kennedy 04:55, 30 August 2006 (UTC)
replies: text: Definitely, smart pointers and handles are very different concepts. I have not found any serious reference for support this conceptual unification in external links. I suggest to move that section to a non-redirected Handle (computer science). --pybalo 21:11, 21 May 2007 (UTC)

text: Agree. Handles are related to Smart Pointers, but they are not smart pointers by themselves. Rjgodoy 03:01, 22 May 2007 (UTC)

text: I agree, but drop a line here about the discussion. I believe I have read something about SP and handles some time ago, but I cannot remember neither the source nor the idea... I got used to think about SP as things with -> overloaded. Rjgodoy 02:59, 29 May 2007 (UTC)

text: Since you have found a reliable source, can we get rid of ? Rjgodoy 03:03, 29 May 2007 (UTC)
thread_title: Handles aren’t smart pointers

message: I HATE handles, Win32 API is not O-O, handles suck. "Smart" pointers, more like "RETARDED AND CONFUSING" pointers! Just my humble opinion. 64.12.116.10 21:23, 5 September 2006 (UTC)
replies: text: Handles don't suck (although the Win32 API does). The Win32 API is OO (usually), just in C's baroque syntax. njaard (talk) 07:40, 17 June 2008 (UTC)
thread_title:  As a Windows Programmer... 

message: I not technically minded, I find this article very confusing. I think a simple English version of this page should be created. 86.41.34.42 (talk) 17:12, 23 April 2009 (UTC)
thread_title:  Simple English version of this page?