[Xapian-discuss] Understanding API Documentation for PHP
James Aylett
james-xapian at tartarus.org
Fri Sep 23 11:27:07 BST 2011
On 23 Sep 2011, at 01:39, Olly Betts wrote:
>> the aim is for idiomatic code in the bindings language to work,
>> and we do well in say Python but less well in others.
>
> Python has this issue too:
>
>>>> import xapian
>>>> doc = xapian.Document()
>>>> doc.add_term(7)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: in method 'Document_add_term', argument 2 of type 'std::string const &'
But that's expected behaviour in Python, not so much in PHP where things have a tendency to automatically mutate between types as convenient; Python is certainly more strongly typed than PHP (or it wouldn't have TypeError).
J
--
James Aylett
talktorex.co.uk - xapian.org - devfort.com
More information about the Xapian-discuss
mailing list