This is the
talk page for discussing improvements to the
Handle (computing) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated Stub-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||
|
More details on handle are needed....
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)
Ouch!. I was found an interesting counter-argument for our objections: a 2007 C++ Glossary, from none other than Bjarne Stroustrup!
Ok, a smart pointer can be called a handle... if we can a agree what is a handle.
Following the discussed plan, I will create Handle (computing) (or Handle (computer science)) as a pseudo-disambiguation page, explaining related and unrelated concepts named handle in computing. It may include:
Bonus track:
More definitions on FOLDOC & answers.com.
I think may be appropriate to move this discussion page to discussion of new page. Do you agree? pybalo 23:55, 28 May 2007 (UTC)
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)
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)
This is the
talk page for discussing improvements to the
Handle (computing) article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google ( books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
![]() | This article is rated Stub-class on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||
|
More details on handle are needed....
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)
Ouch!. I was found an interesting counter-argument for our objections: a 2007 C++ Glossary, from none other than Bjarne Stroustrup!
Ok, a smart pointer can be called a handle... if we can a agree what is a handle.
Following the discussed plan, I will create Handle (computing) (or Handle (computer science)) as a pseudo-disambiguation page, explaining related and unrelated concepts named handle in computing. It may include:
Bonus track:
More definitions on FOLDOC & answers.com.
I think may be appropriate to move this discussion page to discussion of new page. Do you agree? pybalo 23:55, 28 May 2007 (UTC)
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)
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)