Iteration

Abstraction is a concept familiar to programmers, and a term in common use. Abstraction is often discussed as a quality of code, but it can also describe a process of technology changing in a particular way over time. Gilbert Simondon, among others, offers the term concretization to describe a kind of anti-parallel process where technology components become more specific and effective over time, as designs evolve.

That introduction is pretty abstract. Examples can be seen in the changing design of loops.

Continue reading

Advertisements

A White Horse Is Not A Horse

   曰:马者,所以命形也;白者,所以命色也。命色者非名形也。故曰:“白马非马”。
公孙龙子

‘Horse’ is that by which we name the shape. ‘White’ is that by which we name the color. Naming the color is not naming the shape. So white horse is not horse.
  — Gongsun Longzi

public class Horse extends Shape{
 ...
}

public class WhiteHorse extends Horse implements Colourable
{
  public Colour getColour(){ return Colours.WHITE; }

  public boolean equals( Object other ){
    if ( !other instanceof WhiteHorse){
      return false; 
    }
    ...
  }
}

public class AnotherWhiteHorse{

  public Shape getShape(){ return ShapeConstants.HORSE; }

  public Colour getColour(){ return Colours.WHITE; }

}


public class Argument{
  public static void main(String[] args){
    Horse horse = new Horse();
    WhiteHorse whiteHorse = new WhiteHorse();
    AnotherWhiteHorse anotherWhiteHorse = new AnotherWhiteHorse();
    log.info( whiteHorse == Horse.class );
    log.info( WhiteHorse.class == Horse.class );
    log.info( WhiteHorse.class.equals( Horse.class ) );
    log.info( whiteHorse == horse );
    log.info( whiteHorse.equals ( horse ) );
    log.info( anotherWhiteHorse == horse );
    log.info( anotherWhiteHorse.equals ( horse ) );
    log.info( anotherWhiteHorse instanceof Horse.class );
    log.info( "Therefore white horse is not horse" );
  }
}