Data abstraction

From: Fred Cisin <cisin_at_xenosoft.com>
Date: Sat Mar 2 12:22:41 2002

On Sat, 2 Mar 2002, Glen Goodwin wrote:
> Fred, what do you mean here? Too abstract, or not abstract enough? The
> code *is* portable, which requires an certain degree of abstraction.
> Please clarify -- thanks.

Entirely an issue of personal preference.
Consider three hypothetical forms of source code:

A: MOV AH, 2
        MOV DL, 41h
        INT 21h

B: MOV AH, 2 ; character display function
        MOV DL, 'B'
        INT 21h ; DOS API

C: MOV AH, DISPLAY
        MOV DL, OURCHAR
        INT DOSSERVICES

I prefer B, but there were a few cases where I felt that he was tending
towards C. (and plenty of times when I slip into writing A)

Abstraction is very useful and necessary for some types of portability.
But I don't like to have to go thorough a separate .H file to find out
what the code is that is being abstracted.

--
Grumpy Ol' Fred        cisin_at_xenosoft.com
Received on Sat Mar 02 2002 - 12:22:41 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:09 BST