discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PROPOSAL: Objective-C++


From: Kim Shrier
Subject: Re: PROPOSAL: Objective-C++
Date: Mon, 19 Nov 2001 14:40:47 -0600

Ziemowit Laski wrote:
> 
> 
> Two questions on behalf of the benighted among us (which may include just
> me, but so be it):
>    -- What does POC stand for?

Portable Object Compiler


>    -- What is this 'blocks' feature in the POC compiler?
> 

A block is a piece of code that can be passed as a parameter in a
subroutine or a method.  Smalltalk has this feature and it is
similar to Lambda expresions in Lisp.  The classic example of the
usefulness of blocks is in sorting routines.  For example, if you
write a subroutine or have a method that performs the quicksort
algorithm, you need to have some method for specifying the
comparison operation.  In C, this is usually solved by passing a
pointer to a function that compares 2 values and returns a less
than, equal to, or greater than kind of status.  If you had blocks,
you could pass a block of code instead of a pointer to a function.

David Stes wrote a paper in 1998 where he describes Objective C
blocks and talks about the syntax for them.  You can read it at
http://users.pandora.be/stes/block98/index.html

Kim
-- 
 Kim Shrier - principal, Shrier and Deihl - mailto:kim@tinker.com
Remote Unix Network Admin, Security, Internet Software Development
  Tinker Internet Services - Superior FreeBSD-based Web Hosting
                     http://www.tinker.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]