From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: [OT] What langauges have symbols? Date: Fri, 30 Jun 2017 12:15:09 +0700 Message-ID: References: <87efu2w1ak.fsf@jane> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1498799774 28757 195.159.176.226 (30 Jun 2017 05:16:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 30 Jun 2017 05:16:14 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 30 07:16:06 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQoHm-00072u-D0 for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jun 2017 07:16:06 +0200 Original-Received: from localhost ([::1]:42553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQoHr-0006O6-Ls for geh-help-gnu-emacs@m.gmane.org; Fri, 30 Jun 2017 01:16:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQoHF-0006MO-Bl for help-gnu-emacs@gnu.org; Fri, 30 Jun 2017 01:15:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQoHE-0005US-Ck for help-gnu-emacs@gnu.org; Fri, 30 Jun 2017 01:15:33 -0400 Original-Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:36275) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dQoHE-0005Sn-7Z for help-gnu-emacs@gnu.org; Fri, 30 Jun 2017 01:15:32 -0400 Original-Received: by mail-io0-x22b.google.com with SMTP id z62so18428268ioi.3 for ; Thu, 29 Jun 2017 22:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=zusuzc2BO6oT3SXkzFDBHGUjPJyorgjQ/ZHGb6ueAXg=; b=X94Jo23TPd2Dkj27+qfs4IYXl8cx/kg0onllrOVsvaYq807WlEXP/fz43uvjskZj1Y /15H+NCmtp++lMvm1sN4qvSMIbhtY28qPZWl/KGXP3nD/tXAecPL0jmlBVBEhhRm20gT pmnWTdmL1CO49iwK6xZ5aav6G5wz5euH/j1klbhSiFNVdibrJ0hVWYLQgWaf/38HMpI1 5l1NHClsJ89YrG4VjA0PLINROn4wLkosRfIHigutwl4Tr4Q4FBJzaT6BIclhmywsu9s3 iKGzfb7xdby1TKGiECwWC7qaGYpKFBZFuvp6sOE52WR6sg2KgNL0w98GpycIp6nlNYrR KLcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=zusuzc2BO6oT3SXkzFDBHGUjPJyorgjQ/ZHGb6ueAXg=; b=gUd6kDcNM87UZQmnlvLTIUf7O5NjsRZHSD5Q1kli81EZKzUXJVFkyIgFwXQ5DkpAEV 1/SvDW1UMIotHPgxqxU+1icv9pBhaHucCDtyHb9S5dmzW8hjEi5t6oUIACP6SP302f3u XEapPIMuMyf7INQ0C4fcuySQI2G5HEqo9MM8aFkTgfyfBlgB3Chuj30hPlo7eINPpO9P pExipkHEE6rvZFesrB3c0hp9O6MtIlXKBYSUqTtw3J3VzP7370baP9lNSk+c+XKxb//V 7L8Jb9AZyh2rBDBejv9VA3AUsBolGsO0hp/GJoffAhBdp0WAhhKsbRBZJRF5hV4mTtky K5dg== X-Gm-Message-State: AKS2vOyexiS38sGMU3tj4OxjLKYhEE4eD0lQPB5eTspMIQUAECcmnMn8 sSioa0cQHPcimZjKwOjuK3YYl2lqNQ== X-Received: by 10.107.35.5 with SMTP id j5mr20776445ioj.52.1498799730207; Thu, 29 Jun 2017 22:15:30 -0700 (PDT) Original-Received: by 10.79.122.147 with HTTP; Thu, 29 Jun 2017 22:15:09 -0700 (PDT) In-Reply-To: <87efu2w1ak.fsf@jane> X-Google-Sender-Auth: Ak-lG5EaR1Nv8Ji5YEa8AzVFVq8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113612 Archived-At: On Fri, Jun 30, 2017 at 11:24 AM, Marcin Borkowski wrote: > 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). You can, kind of. In Javascript (also known as ECMAScript), there are no global variables. They are emulated as properties of the global object. The global object in web browsers is =E2=80=98window=E2=80=99. All objects support setting properties by statically known name: window.bar =3D "baz"; console.log(bar); // prints =E2=80=9Cbaz=E2=80=9D or dynamically: function foo() { return "bar"; } window[foo()] =3D "baz"; console.log(bar); // prints =E2=80=9Cbaz=E2=80=9D So, in Javascript, for purposes of setting a variable by computed name, the closest idea to Lisp=E2=80=99s symbols is a string. I cannot recall any language other than Lisp that has symbols in the sense of literal values which are distinct from every other value.