guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding record types


From: Hartmut Goebel
Subject: Question regarding record types
Date: Fri, 4 Nov 2016 23:31:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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          | address@hidden               |
| www.crazy-compilers.com | compilers which you thought are impossible |





reply via email to

[Prev in Thread] Current Thread [Next in Thread]