Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 06:19 UTC)
Re: Proposal for SRFI 253: In-source documentation Vladimir Nikishkin (25 May 2024 06:25 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 06:59 UTC)
Re: Proposal for SRFI 253: In-source documentation Retropikzel (25 May 2024 06:40 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 06:46 UTC)
Re: Proposal for SRFI 253: In-source documentation Retropikzel (25 May 2024 07:14 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 07:32 UTC)
Re: Proposal for SRFI 253: In-source documentation Retropikzel (25 May 2024 08:19 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 09:02 UTC)
Re: Proposal for SRFI 253: In-source documentation Lassi Kortela (25 May 2024 10:04 UTC)
Re: Proposal for SRFI 253: In-source documentation Jakub T. Jankiewicz (25 May 2024 09:44 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 10:32 UTC)
Re: Proposal for SRFI 253: In-source documentation Jakub T. Jankiewicz (25 May 2024 11:36 UTC)
Re: Proposal for SRFI 253: In-source documentation Daphne Preston-Kendal (25 May 2024 11:06 UTC)
Re: Proposal for SRFI 253: In-source documentation Antero Mejr (25 May 2024 11:23 UTC)
Re: Proposal for SRFI 253: In-source documentation Daphne Preston-Kendal (25 May 2024 11:30 UTC)

Re: Proposal for SRFI 253: In-source documentation Jakub T. Jankiewicz 25 May 2024 09:44 UTC

I personally don't see a reason to document something other then top level
entities that you can access from REPL, like procedures, macros, and
variables.

In LIPS I've implemented same mechanism as in Emacs Lisp and Python. I don't
see a reason for specific syntax for docstrings, as name suggests they should
be strings.

In LIPS I have this syntax:

(define (foo x)
  "This is doc string"
  (+ x x))

(define-macro (foo x)
  "This is doc string)
  `(list ,x))

Additionally when defining variables or hygienic macros doc string is at the
end.

(define foo 10 "this is doc string")

(define-syntax foo (syntax-rules () ((_ x) x)) "this is doc string")

On Sat, 25 May 2024 06:19:08 +0000
Antero Mejr <xxxxxx@antr.me> wrote:

> I would like to propose a SRFI for in-source documentation (AKA
> docstrings). The syntax is similar to #| multi-line comments. The
> repository is here:
> https://github.com/pre-srfi/in-source-documentation
>
> Thanks!

--
Jakub T. Jankiewicz, Senior Front-End Developer
https://jcubic.pl/me
https://lips.js.org
https://koduj.org