POV-Ray : Newsgroups : povray.off-topic : Ha! I knew I wasn't crazy : Re: Ha! I knew I wasn't crazy Server Time
3 Sep 2024 17:17:22 EDT (-0400)
  Re: Ha! I knew I wasn't crazy  
From: Darren New
Date: 22 Oct 2010 17:08:13
Message: <4cc1fd3d$1@news.povray.org>
Orchid XP v8 wrote:
> I'd be rather surprised if that's what I said, given that I have no clue 
> what the hell an abstract data type actually is.

As I said, I obviously misremembered, because looking at the definition of 
algebraic data type, you obviously wouldn't confuse those two.

An ADT is a type whose operations are defined algebraically. So instead of 
saying "Push adds a value to the stack. Top tells you what's on top. Etc" 
you say something like

For all X, push(X, empty) does not equal Empty.
For all X and all S, top(push(X,S))==X
For all X and all S, pop(push(X,S))==S
(And of course you add the type signatues just like in Haskell)

It says absolutely nothing about what you have to do to implement it. Yet 
you can prove you've specified every possible combination.

Peano arithmetic is a sort of abstract data type for the integers.

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.