Updated: 11/5/2005; 6:07:55 PM.
Chris Double's Radio Weblog
        

Saturday, October 30, 2004

Slava Pestov posts about type inferencing in Factor.

4:33:37 PM      

While I'm mentioning Predicate Dispatch - Here's a Java based Predicate Dispatch implementation: JPred. It seems to do its magic via a custom Java compiler (built on top of an extensible compiler system).

4:22:32 PM      

From Lemonodor: A paper describing how to implement predicate dispatch in portable Common Lisp: Predicate Dispatching in the Common Lisp Object System.

Predicate dispatch is a generalisation of multi-method dispatch. Instead of dispatching on the type of an object you can define a 'predicate' function that returns true or false to indicate whether or not the passed object matches the type signature. As an example you could have methods that operate on 'empty lists' where the predicate is 'list size is zero' and non-empty lists where the predicate is 'list size is greater than zero'. The particular method will be called depending on whether the list is empty or non-empty.

Cecil is an example of a programming language that has predicate dispatch built in.

4:18:05 PM      

© Copyright 2005 Chris Double.
 
October 2004
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Sep   Nov



Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.