unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Taylan Kammer <taylan.kammer@gmail.com>
To: Andreas Reuleaux <rx@a-rx.info>, lloda <lloda@sarc.name>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: hashmark in symbols
Date: Mon, 2 Jan 2023 07:59:40 +0100	[thread overview]
Message-ID: <6e2158f1-4c28-85f3-4283-4aee63332529@gmail.com> (raw)
In-Reply-To: <87sfgtzc4u.fsf@laptop>

On 02.01.2023 07:25, Andreas Reuleaux wrote:
> Ah, OK, this helps indeed
> 
> --8<---------------cut here---------------start------------->8---
> (read-enable  'r7rs-symbols)
> --8<---------------cut here---------------end--------------->8---
> 
Another option would be to use string->symbol:

  (string->symbol "#444")

That being said, I wonder if it's not better to use strings for this.

Is there any particular reason you want to use symbols to represent CSS
color values?  I assume that your main requirements are:

- Easy to represent as literal values in code.

- Easy to splice into a bigger string (or write into an output stream) that
  will become an entire CSS code snippet or file.

Strings seem like the most straightforward choice.  All in all there's not
much difference though, given that symbols are basically just automatically
interned immutable strings.

-- 
Taylan




  reply	other threads:[~2023-01-02  6:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02  2:27 hashmark in symbols Andreas Reuleaux
2023-01-02  6:04 ` lloda
2023-01-02  6:25   ` Andreas Reuleaux
2023-01-02  6:59     ` Taylan Kammer [this message]
2023-01-02 16:20       ` Andreas Reuleaux

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

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e2158f1-4c28-85f3-4283-4aee63332529@gmail.com \
    --to=taylan.kammer@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=lloda@sarc.name \
    --cc=rx@a-rx.info \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).