Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Austin Ziegler
On Thu, Nov 20, 2008 at 6:09 PM, Ken Tozier <[EMAIL PROTECTED]> wrote: > Just out of curiosity, why do you need to send such common math > operations to a soap request? Wouldn't it be easier to do simple stuff > like calculations in your Soap class and only make requests for the > unique services t

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 5:53 PM, Charles Srstka wrote: On Nov 20, 2008, at 7:40 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jo

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Charles Srstka
On Nov 20, 2008, at 7:40 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 5:06 PM, Charles Srstka wrote: On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into ob

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Charles Srstka
On Nov 20, 2008, at 5:58 PM, Jonathon Kuo wrote: On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into objects. Functions don't retain state; objects do. Objec

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote: On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: Just my 2 cents, but it seems an abuse to turn functions into objects. Functions don't retain state; objects do. Objective C very gracefully allows objects to call C

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Ken Tozier
Just out of curiosity, why do you need to send such common math operations to a soap request? Wouldn't it be easier to do simple stuff like calculations in your Soap class and only make requests for the unique services the endpoint provides? On Nov 20, 2008, at 12:27 AM, Austin Ziegler wro

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Shawn Erickson
On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo <[EMAIL PROTECTED]> wrote: > Just my 2 cents, but it seems an abuse to turn functions into objects. > Functions don't retain state; objects do. Objective C very gracefully allows > objects to call C functions. If you're doing something like [calc > add

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Jonathon Kuo
On Nov 19, 2008, at 9:27 PM, Austin Ziegler wrote: For a project that I'm working on, I have a need to write a code generator that will wrap certain kinds of C functions as Objective C messages on an Objective C proxy. Because I don't ultimately control the input, the parameters on the C functio

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Austin Ziegler
On Thu, Nov 20, 2008 at 12:15 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > Please excuse a foolish question, but Why wrap this in Objective-C > at all? Looks like the resulting ObjC code is essentially the same, > except uglier, slower, and harder to use. Why not just keep the C and > use it di

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Michael Ash
On Thu, Nov 20, 2008 at 12:27 AM, Austin Ziegler <[EMAIL PROTECTED]> wrote: > For a project that I'm working on, I have a need to write a code > generator that will wrap certain kinds of C functions as Objective C > messages on an Objective C proxy. Because I don't ultimately control > the input, t

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Bill Bumgarner
On Nov 20, 2008, at 10:54 AM, Alexander Spohr wrote: I’d go for #1. If you have an error in status, throw an exception. In this case, an exception might actually be OK, given that the library is in isolation. However, it goes against the design patterns of Cocoa and if the code is ever re

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Ken Thomases
On Nov 20, 2008, at 6:58 AM, Austin Ziegler wrote: result = [calc addDoubleA:a withDoubleB:b]; // #1 Why not -addDouble:withDouble: ? That is, why are you promoting the argument names into the method signature? Especially since you're aware that the names are (most often) useless. res

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Austin Ziegler
On Thu, Nov 20, 2008 at 4:54 AM, Alexander Spohr <[EMAIL PROTECTED]> wrote: > I'd go for #1. > If you have an error in status, throw an exception. > > What is the reason to put those functions in a class anyway if you just > mimic the c-function? Are you adding anything? Yes, I am. The C function

Re: Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-20 Thread Alexander Spohr
Austin, I’d go for #1. If you have an error in status, throw an exception. What is the reason to put those functions in a class anyway if you just mimic the c-function? Are you adding anything? atze Am 20.11.2008 um 06:27 schrieb Austin Ziegler: For a project that I'm working on,

Wrapping C functions in Objective C proxy objects: naming convention?

2008-11-19 Thread Austin Ziegler
For a project that I'm working on, I have a need to write a code generator that will wrap certain kinds of C functions as Objective C messages on an Objective C proxy. Because I don't ultimately control the input, the parameters on the C functions may be poorly named. I'm looking for advice on how