unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [OT] What langauges have symbols?
@ 2017-06-30  4:24 Marcin Borkowski
  2017-06-30  5:15 ` Yuri Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Marcin Borkowski @ 2017-06-30  4:24 UTC (permalink / raw)
  To: Help Gnu Emacs mailing list

Hi there,

this is clearly OT, but where could I ask that?

What langauges besides Lisps have "symbols"?  And I not only mean the
name, of course, but also the properties.  For instance, ES6 seems to
have something similar, but it seems to me that you can't have
a variable containing a symbol and say something like
(set var val)
where val is assigned to a variable whose name is the value of var
(i.e., that symbol).

In Elisp, OTOH, you can say e.g.

(set (intern "some-string") 123)
(+ some-string 1)

and obtain 124.  My point here is that you can now use a variable called
"some-symbol" without any additional syntax sugar.  In yet another
words, we have both set and setq, whereas most languages seem to only
have an equivalent of setq.

TIA,

-- 
Marcin Borkowski



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

end of thread, other threads:[~2017-07-01  3:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-30  4:24 [OT] What langauges have symbols? Marcin Borkowski
2017-06-30  5:15 ` Yuri Khan
2017-06-30  6:10 ` Eli Zaretskii
2017-07-01  0:59 ` Danny YUE
2017-07-01  3:11   ` Emanuel Berg

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).