From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: Guix-devel <guix-devel@gnu.org>
Subject: Question regarding record types
Date: Fri, 4 Nov 2016 23:31:42 +0100 [thread overview]
Message-ID: <a33db22e-d2da-d13b-670a-55df31b07699@crazy-compilers.com> (raw)
Hi,
in the services modules, there are configuration types defined like this:
(define-record-type* <nginx-configuration>
nginx-configuration make-nginx-configuration
nginx-configuration?
(nginx nginx-configuration-nginx) ;<package>
(log-directory nginx-configuration-log-directory) ;string
(run-directory nginx-configuration-run-directory) ;string
(vhosts nginx-configuration-vhosts
(default '())) ;list of <nginx-vhost-configuration>
(file nginx-configuration-file)) ;string | file-like
I wonder if it's really necessary to have this prefix
"nginx-configuration-" for what I assume is the getter? For me it looks
redundant. The getter is only valid for this very type, so why should
there be any need to add a prefix?
If the reason is, that all these getters are defined globally, them I'm
astound, why there is no syntax like my_config->log-directory, which
would remove this redundancy.
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
next reply other threads:[~2016-11-04 22:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 22:31 Hartmut Goebel [this message]
2016-11-06 17:24 ` Question regarding record types Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a33db22e-d2da-d13b-670a-55df31b07699@crazy-compilers.com \
--to=h.goebel@crazy-compilers.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.