unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: taylanbayirli@gmail.com (Taylan Ulrich B.)
To: Panicz Maciej Godek <godek.maciek@gmail.com>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: guile-json 0.2.0 released
Date: Sun, 07 Apr 2013 22:38:05 +0200	[thread overview]
Message-ID: <87ehemxej6.fsf@taylan.dyndns.org> (raw)
In-Reply-To: <CAMFYt2Y52Gui6BAZc73-O5+c_2UMCVgcq4zEv2QQcsJu1rGRLg@mail.gmail.com> (Panicz Maciej Godek's message of "Sun, 7 Apr 2013 13:40:48 +0200")

Panicz Maciej Godek <godek.maciek@gmail.com> writes:
> I agree. But Adam Smith would say that it's the market who says what's
> right and what's wrong ;)

I don't know Adam Smith, but I know that I disagree with this particular
quote, at least at face value.  I will continue to disregard adoption
rates while considering a programming language as a role-model.  The
reasons for that are way beyond the scope of this discussion I'm afraid.

> I've read about it even before it became an SRFI draft, at David
> Wheeler's website, so I know the idea quite well. When I say about
> randomness, I'm not saying that it's not well-defined, but that it's
> conceptually or cognitively incoherent. First, there's the idea of
> having an infix notation. In a way I can understand it, because we're
> all educated to write "two plus two" instead of "add two to two". But
> once the infix notation is available, am I obliged to write {2 + 2},
> or can I mix it with (+ 2 2) freely? That's the unnecessary choice
> that I need to make. But I can swallow that. However, since the infix
> notation is available, how will a common infix expression like {2 * 3
> + 4 / 5} behave? As expected? Nope. And inside curly braces, do round
> parentheses behave as precedence operators, or as they behave outside
> curly braces? And what about curly braces? Let's look at some
> examples:
> 30. {(map - ns)} ⇒ (map - ns)
> 31. {map(- ns)} ⇒ (map - ns) as well
> Why on earth would anyone want to write {(map - ns)} instead of (map -
> ns)? And why is it cooler to write {f{x}} or {f(x)} instead of (f x)?
> Because it somehow resembles the notation used by mathematicians? So
> it's because of an idol! And why {f{- x}} maps to (f (- x)), while {f
> (- x)} maps to (f - x), and not the other way around? And why do I
> have to remember that?!
> I could go on like that. As you can see, a lot of arbitrary choices
> were made in this SRFI, which were justified in this way or the other.
> And I think that ony a few persons in the world will ever know all of
> those justifications. For the remaining ones, reading code that uses
> "curly infix" extensively will be a nightmare. Besides, it's so
> un-scheme if there are a few people who know better than you how you
> are going to use the language -- it would be sufficient if the reader
> transformed {...} into (curly ...) or something like that, because
> then the programmer could utilize the curly braces any way he wanted
> to using plain scheme macros, whether it be an infix notation (either
> with or without precedence) or list comprehensions, or lazy
> evaluation, or function composition, or currying/binding, or indexing,
> or whatever.

I don't intend to discuss the usefulness of SRFI-105 in general, but it
offers a relatively clean solution to the problem you mentioned, so I
see no reason not to use it to solve that problem.  {object[key]} does
not look much worse than e.g. #[object key] (and {object[key][key]}
looks better than #[[object key] key] IMO), is already implemented in
Guile, and actually has a chance to become standard.

I would use SRFI-105 for now, and/or depending on how important it is to
me, would work on a good general interface for making applicable objects
in Guile.



  reply	other threads:[~2013-04-07 20:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  7:08 guile-json 0.2.0 released Aleix Conchillo Flaqué
2013-04-04  9:11 ` Panicz Maciej Godek
2013-04-04 10:15   ` Taylan Ulrich B.
2013-04-04 12:06     ` Panicz Maciej Godek
2013-04-04 22:21       ` Taylan Ulrich B.
2013-04-04 22:59         ` Aleix Conchillo Flaqué
2013-04-05  7:35           ` Panicz Maciej Godek
2013-04-04 23:39         ` Daniel Hartwig
2013-04-07 11:40         ` Panicz Maciej Godek
2013-04-07 20:38           ` Taylan Ulrich B. [this message]
2013-04-08  1:51             ` Daniel Hartwig
2013-04-08  2:11           ` Daniel Hartwig
2013-04-05  0:17       ` Daniel Hartwig
2013-04-05  2:47         ` Noah Lavine
2013-04-05  9:35           ` Daniel Hartwig
2013-04-05 13:18             ` Noah Lavine
2013-04-05  9:41         ` Panicz Maciej Godek
     [not found]     ` <CAPjoZodAaHLfPGb+XiUhoMJD7J4_kYrjRmYP+p1S5w5yuPgLEg@mail.gmail.com>
     [not found]       ` <CAPjoZoc12W4usGnkwSZG2zNqe8xF6C4hWWZgq+-Nc8HMg_Xw4Q@mail.gmail.com>
2013-04-04 15:11         ` Nala Ginrut

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=87ehemxej6.fsf@taylan.dyndns.org \
    --to=taylanbayirli@gmail.com \
    --cc=godek.maciek@gmail.com \
    --cc=guile-user@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.
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).