help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] What langauges have symbols?


From: Danny YUE
Subject: Re: [OT] What langauges have symbols?
Date: Sat, 01 Jul 2017 08:59:34 +0800
User-agent: mu4e 0.9.18; emacs 25.2.1

On 2017-06-30 04:24, Marcin Borkowski <mbork@mbork.pl> wrote:
> 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,

Well, Ruby can be counted as one.

http://www.randomhacks.net/2005/12/03/why-ruby-is-an-acceptable-lisp/
https://news.ycombinator.com/item?id=12470715

I think Ruby can be understood as SmallTalk skeleton plus some lisp
spirit.

It has symbols, function keyword arguments, lambda and procedure as high
order function, can call function by name as
`object.send("func_name")`...

Not like "one single way to solve a problem" way, which is definitely
not what lispers like, Ruby provides basic magic and it is your decision
how to use the power.

I am not a Ruby expert, but I learned Common/Emacs Lisp for some years.
I always tried to find another language that are battery-included and
can compare with lisp.
(This is sad because Common Lisp standard has not been updated for too
long, and )

I tried some languages like Go but found it too far from the feeling
that Lisp brings to me, until I met up Ruby.

I think if you want something that can somehow replace Lisp in some
field, especially system scripts, websites or deployable applications,
you can apparently consider Ruby...


Danny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]