unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Meaning of <=> in the context of procedures
@ 2021-06-02 14:06 Mortimer Cladwell
  2021-06-02 16:12 ` Linus Björnstam
  0 siblings, 1 reply; 3+ messages in thread
From: Mortimer Cladwell @ 2021-06-02 14:06 UTC (permalink / raw)
  To: guile-user

Hi,
What does <=> mean/do?
It can be found in guile-json in the (json record) module, line 33:

33 #:export (<=> define-json-mapping define-json-type))

Not mentioned in the entire Guile manual. Happens to be defined on line 36
of the module:

36  (define <=> '<=>)

I didn't find that very helpful :)
Thanks
Mortimer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning of <=> in the context of procedures
  2021-06-02 14:06 Meaning of <=> in the context of procedures Mortimer Cladwell
@ 2021-06-02 16:12 ` Linus Björnstam
  2021-06-02 16:21   ` Linus Björnstam
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Björnstam @ 2021-06-02 16:12 UTC (permalink / raw)
  To: Mortimer Cladwell, guile-user

It is a trick to allow using the symbol '<=> as an identifier instead of quoting it. Nothing special. Guile-json probably uses it somehow.

If it is used as auxiliary syntax in a macro, it is probably exported so guile can warn that it is being shadowed instead of (or rather: in addition to) producing bad error messages.

-- 
  Linus Björnstam

On Wed, 2 Jun 2021, at 16:06, Mortimer Cladwell wrote:
> Hi,
> What does <=> mean/do?
> It can be found in guile-json in the (json record) module, line 33:
> 
> 33 #:export (<=> define-json-mapping define-json-type))
> 
> Not mentioned in the entire Guile manual. Happens to be defined on line 36
> of the module:
> 
> 36  (define <=> '<=>)
> 
> I didn't find that very helpful :)
> Thanks
> Mortimer
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Meaning of <=> in the context of procedures
  2021-06-02 16:12 ` Linus Björnstam
@ 2021-06-02 16:21   ` Linus Björnstam
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Björnstam @ 2021-06-02 16:21 UTC (permalink / raw)
  To: Mortimer Cladwell, guile-user

To reply to myself: it is an exported identifier that is used in a define-json-mapping. It is good form for macros to export all its auxiliary syntax. 


-- 
  Linus Björnstam

On Wed, 2 Jun 2021, at 18:12, Linus Björnstam wrote:
> It is a trick to allow using the symbol '<=> as an identifier instead 
> of quoting it. Nothing special. Guile-json probably uses it somehow.
> 
> If it is used as auxiliary syntax in a macro, it is probably exported 
> so guile can warn that it is being shadowed instead of (or rather: in 
> addition to) producing bad error messages.
> 
> -- 
>   Linus Björnstam
> 
> On Wed, 2 Jun 2021, at 16:06, Mortimer Cladwell wrote:
> > Hi,
> > What does <=> mean/do?
> > It can be found in guile-json in the (json record) module, line 33:
> > 
> > 33 #:export (<=> define-json-mapping define-json-type))
> > 
> > Not mentioned in the entire Guile manual. Happens to be defined on line 36
> > of the module:
> > 
> > 36  (define <=> '<=>)
> > 
> > I didn't find that very helpful :)
> > Thanks
> > Mortimer
> > 
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 14:06 Meaning of <=> in the context of procedures Mortimer Cladwell
2021-06-02 16:12 ` Linus Björnstam
2021-06-02 16:21   ` Linus Björnstam

unofficial mirror of guile-user@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-user/0 guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ https://yhetil.org/guile-user \
		guile-user@gnu.org
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.user
	nntp://news.gmane.io/gmane.lisp.guile.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git