[cap-talk] Potting the web-calculus in a paragraph

Bill Frantz frantz at pwpconsult.com
Fri Dec 16 20:48:49 EST 2005


On 12/16/05, smagi at naasking.homeip.net (Sandro Magi) wrote:

>Bill Frantz wrote:
>
>>On 12/15/05, smagi at naasking.homeip.net (Sandro Magi) wrote:
>>  
>>
>>>So a brand can be likened to a class. Can anyone elaborate on the 
>>>differences from a class?
>>>    
>>>
>>
>>In general, class is a compile-time notion.  Brands are more run-time.
>>
>>One place I have seen brands used is in digital money demos.  You define
>>a class called purse.  Each type of currency (think Euro, Dollar etc.)
>>has its own brand.  Purses can transfer funds between themselves if they
>>are of the same currency.  They use brands to identify whether the other
>>purse in a transfer has the same currency.  While two purses with
>>different brands are instances of the same class, the brand difference
>>means they represent different currencies.
>>  
>>
>
>Thanks for the clarification.
>
>This sounds like units in measurement, where a Measurement is a class 
>whose instances encapsulate a numeric quantity and units; certain 
>operations generate a new set of units (ie. division), and certain other 
>operations (ie. comparison) is only possible between measurements with 
>the same units.

It is something like that.  In the case of digital money, you would have
to allow for changing exchange rates, which is why purses do not perform
transfers when their brands (currencies) differ.

For information about an implementation in E, see
<http://www.erights.org/smart-contracts/ertp/money.html>.  By following
the threads, you should be able to tease out how brands are used in an E
implementation of digital money.

Cheers - Bill

-----------------------------------------------------------------------
Bill Frantz        | gets() remains as a monument | Periwinkle 
(408)356-8506      | to C's continuing support of | 16345 Englewood Ave
www.pwpconsult.com | buffer overruns.             | Los Gatos, CA 95032



More information about the cap-talk mailing list