This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v1 02/36] Guile extension language: doc additions


Doug Evans <xdje42@gmail.com> skribis:

> On Fri, Jan 3, 2014 at 1:30 PM, Ludovic CourtÃs <ludo@gnu.org> wrote:
>>>> +The optional @var{errors} argument is either @code{"strict"}
>>>> +or @code{"replace"}.  A value of @code{"strict"} corresponds to
>>>> +Guile's @code{SCM_FAILED_CONVERSION_ERROR} and a value of @code{"replace"}
>>>> +corresponds to Guile's @code{SCM_FAILED_CONVERSION_QUESTION_MARK}.
>>>
>>> Suggest a cross-reference to Guile documentation here.
>>
>> Agreed.  Also, Guile talks of âconversion strategyâ and âconversion
>> error handlerâ, with values âerrorâ, âsubstituteâ, and âescapeâ (at the
>> Scheme level), and Iâd recommend sticking to those names and terminology.
>
> The values chosen were to be consistent with the python support.
> OTOH I *do* like being more consistent with the particular extension
> language at hand.
> I've tentatively changes things to use "error" and "substitute".
> Question: How about exporting the SCM_FAILED_CONVERSION_* constants
> and using those instead?
>
> E.g, (value->string foo #:errors SCM_FAILED_CONVERSION_ERROR) ?

Iâd rather use a symbol:

  (value->string foo #:conversion-strategy 'error)

So that has to be converted in C but I think thatâs OK.

(I just noticed that Guileâs âpointer->stringâ, which is similar, lacks
this argument.)

> Also, in the same spirit of naming things with preference to being
> more consistent with the extension language at hand than being more
> consistent across all extension languages, does anyone mind if I
> rename the "guile-interactive" command to "guile-repl"?

Fine with me.

Thanks,
Ludoâ.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]