× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Alan Campin wrote:
Also, about returning a pointer from a service program.
I would consider this to be bad practice no matter what. The pointer can
be used to do anything and exposes the internals of your service
program.
Returning a handle that points into an array is always a much better way
Everything is managed and hidden in the service program.

It seems to me like using a handle instead of a pointer adds unnecessary complexity. If you can't trust the consumers of your service program not to mess with the data when given a pointer, what's to stop them from making up handle values to mess with other lists?

I can see a case for designing a more secure handle if the software will be widely distributed, or if the results of someone messing with the service program internals could be particularly disastrous. Otherwise, it seems to me like an awful lot of work for not a lot of gain.

I'd be really interested in arguments as to why handles are really better. I'm most likely missing something that more experience could illuminate.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.