Archive of UserLand's first discussion group, started October 5, 1998.

Re: Is XML-RPC a scripting environment?

Author:Skip Montanaro
Posted:1/20/1999; 12:48:44 PM
Topic:Frontier on MacOS X Server
Msg #:2327 (In response to 2293)
Prev/Next:2326 / 2328

> We can make Perl better by including booleans in the wire protocol,
> clearly Perl must have *some* convention for what a boolean is,
> right? How could you program without booleans? So if the language
> doesn't have support for boolean, we could simply say when Perl gets
> a  true it is always turned into a 1 and a false is
> always 0. 

The problem is going the other way. When Perl sends a 1 as "true" it will get encoded as 1. If the server that decodes that message to an int passes it to a function that really does distinguish between booleans and ints (Pascal, anyone?), you'll get a fault.

I think Fredrik's solution, to define True and False objects in the XML RPC library, is a good one. The client-side programmer can insert those values into the call (perhaps in the stub routine), knowing they will be properly encoded and interpreted on the server.

Skip


There are responses to this message:


This page was archived on 6/13/2001; 4:47:28 PM.

© Copyright 1998-2001 UserLand Software, Inc.