Numbering
Peano |
|
Bill discusses the contrastingNum.java
examples and what he sees in them. (All times in these notes are Pacific Daylight Time (PDT), gmt-0700.)
The First Num.java (anderbill):
package com.orcmid.cs.pa; public interface Num { public int next(); public int pred(); public boolean is0(); }
The Second Num.java (orcmid):
// package com.orcmid.llc.pa.pn; public interface Num { public Num next(); public Num pred(); public boolean isOrigin(); }
Num.java
examples.> 1. We have moved from comments to e-mail. That is interesting.
I didn't see an easy way of keeping the code separate and easily manipulated. I also thought a move to a wiki would be better, but wanted to wait for the compilable interface first.
> 2. Although my note was intentionally crude, I see that our automatic
> induction of meaning has already led to something interesting. I had not
> omitted the result type ofpred()
andnext()
, although I can see how that
> could be seen as a mistake by me.
>
> 3. Here is an update based on your version.I thought about saying
public Num next();
but my choice ofint
reflects my own imperfect understanding of Java, and maybe OOP.> 3.1 It is interesting to wonder whether there is some advantage in
> changing the names ofpred()
andnext()
to something else, although that
> has only a temporary advantage.Agile methods would counsel to use full words like "successor" and "predecessor".
> 3.2 Likewise, I am not happy about
isOrigin
versusis0
, although changing
> the name is useful. I am not certain about "origin" is all.Yeah, this is very interesting. I thought I had a clue about what
is0()
was about.isOrigin()
seems confusing to me in that it makes me think this is more complicated than I had thought.This is a very interesting example of assumed contexts and meanings.
To Be Continued ...
|
|
created 2004-06-03-22:23 -0700 (pdt) by orcmid |