* programming methodology terminology
@ 2006-01-30 7:15 Hans Reiser
2006-01-30 7:58 ` Ivan Pulleyn
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Hans Reiser @ 2006-01-30 7:15 UTC (permalink / raw)
To: Reiserfs mail-list
suppose there are two distinct layers of abstraction, one on top of the
other. Suppose someone uses the error condition names of the top layer
in coding the bottom layer when the return values it is used for in the
bottom layer have not the same purpose as those of the top layer, and
when it would be an error for the return value to actually get
propagated all the way out of the top layer. What is this bad
programming practice called, there is a name for it isn't there? When
you use a return value #define for two different meanings, is there a
name for that? It is generally accepted to be bad style, yes?
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: programming methodology terminology
2006-01-30 7:15 programming methodology terminology Hans Reiser
@ 2006-01-30 7:58 ` Ivan Pulleyn
2006-01-31 6:04 ` Christian Iversen
2006-02-02 1:34 ` Alexander G. M. Smith
2 siblings, 0 replies; 5+ messages in thread
From: Ivan Pulleyn @ 2006-01-30 7:58 UTC (permalink / raw)
To: Hans Reiser; +Cc: Reiserfs mail-list
It seems like a form of layering violation to me. Conflation of
meaning for a #define is definitely undue obfuscation, if not out
right bad coding.
Ivan...
On 1/29/06, Hans Reiser <reiser@namesys.com> wrote:
> suppose there are two distinct layers of abstraction, one on top of the
> other. Suppose someone uses the error condition names of the top layer
> in coding the bottom layer when the return values it is used for in the
> bottom layer have not the same purpose as those of the top layer, and
> when it would be an error for the return value to actually get
> propagated all the way out of the top layer. What is this bad
> programming practice called, there is a name for it isn't there? When
> you use a return value #define for two different meanings, is there a
> name for that? It is generally accepted to be bad style, yes?
>
> Hans
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: programming methodology terminology
2006-01-30 7:15 programming methodology terminology Hans Reiser
2006-01-30 7:58 ` Ivan Pulleyn
@ 2006-01-31 6:04 ` Christian Iversen
2006-02-02 1:34 ` Alexander G. M. Smith
2 siblings, 0 replies; 5+ messages in thread
From: Christian Iversen @ 2006-01-31 6:04 UTC (permalink / raw)
To: reiserfs-list
On Monday 30 January 2006 08:15, Hans Reiser wrote:
> suppose there are two distinct layers of abstraction, one on top of the
> other. Suppose someone uses the error condition names of the top layer
> in coding the bottom layer when the return values it is used for in the
> bottom layer have not the same purpose as those of the top layer, and
> when it would be an error for the return value to actually get
> propagated all the way out of the top layer. What is this bad
> programming practice called, there is a name for it isn't there? When
> you use a return value #define for two different meanings, is there a
> name for that? It is generally accepted to be bad style, yes?
I'd say it's definitely a layering violation - but I don't know if there's a
more specific name for this particular situation.
--
Regards,
Christian Iversen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: programming methodology terminology
2006-01-30 7:15 programming methodology terminology Hans Reiser
2006-01-30 7:58 ` Ivan Pulleyn
2006-01-31 6:04 ` Christian Iversen
@ 2006-02-02 1:34 ` Alexander G. M. Smith
2006-02-02 1:49 ` Hans Reiser
2 siblings, 1 reply; 5+ messages in thread
From: Alexander G. M. Smith @ 2006-02-02 1:34 UTC (permalink / raw)
To: Hans Reiser; +Cc: Reiserfs mail-list
Hans Reiser wrote on Sun, 29 Jan 2006 23:15:41 -0800:
> When you use a return value #define for two different meanings,
> is there a name for that? It is generally accepted to be bad
> style, yes?
It might be called something overloading, perhaps Semantic Overloading?
- Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: programming methodology terminology
2006-02-02 1:34 ` Alexander G. M. Smith
@ 2006-02-02 1:49 ` Hans Reiser
0 siblings, 0 replies; 5+ messages in thread
From: Hans Reiser @ 2006-02-02 1:49 UTC (permalink / raw)
To: Alexander G. M. Smith; +Cc: Reiserfs mail-list
Alexander G. M. Smith wrote:
>Hans Reiser wrote on Sun, 29 Jan 2006 23:15:41 -0800:
>
>
>>When you use a return value #define for two different meanings,
>>is there a name for that? It is generally accepted to be bad
>>style, yes?
>>
>>
>
>It might be called something overloading, perhaps Semantic Overloading?
>
>- Alex
>
>
>
>
That sounds right. At any rate, we should avoid doing it the way we do
with -E_REPEAT and its cousins..... ;-)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-02 1:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-30 7:15 programming methodology terminology Hans Reiser
2006-01-30 7:58 ` Ivan Pulleyn
2006-01-31 6:04 ` Christian Iversen
2006-02-02 1:34 ` Alexander G. M. Smith
2006-02-02 1:49 ` Hans Reiser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.