[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strings as variable names
From: |
David Kastrup |
Subject: |
Re: Strings as variable names |
Date: |
Mon, 28 Dec 2015 23:04:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Johan Vromans <address@hidden> writes:
> On Mon, 28 Dec 2015 20:27:22 +0100
> David Kastrup <address@hidden> wrote:
>
>> The above is mainly confused. Remember that \n in a string stands for
>> newline.
>
> So there's already some kind of processing done. \{varname} would be an
> alternative.
>
> But it is just a suggestion.
>
>> But what _programming_ languages allow interpolating into quoted
>> strings?
>
> Most dynamic languages like Bash, Perl, JavaScript, ...
You conveniently snipped shells so that you could mention them again.
Perl has gobbled up every syntax from all traditional UNIX utilities
anyway so that does not really count.
JavaScript does not appear to do variable interpolation into string
literals
<URL:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String>
as far as I can see.
That's a far cry from "most programming languages". It's not even "most
dynamic languages". It's shells and Perl. Arguably Cpp though it's not
a programming language of its own. Make knows $x but does not really
work with quoted strings. Awk knows $x but not inside quoted strings.
M4 does not work with quoted strings but will expand recognizable
identifiers in at most one level of [...]. But it's not a programming
language.
Maybe Tcl? Would seem consistent with its history but I don't know it.
--
David Kastrup
- Re: Strings as variable names, (continued)
- Re: Strings as variable names, Andrew Bernard, 2015/12/27
- Re: Strings as variable names, Johan Vromans, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Andrew Bernard, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Johan Vromans, 2015/12/28
- Re: Strings as variable names, Urs Liska, 2015/12/28
- Re: Strings as variable names, Johan Vromans, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Johan Vromans, 2015/12/28
- Re: Strings as variable names,
David Kastrup <=
- Re: Strings as variable names, Johan Vromans, 2015/12/29
- Re: Strings as variable names, David Kastrup, 2015/12/29
Re: Strings as variable names, David Sumbler, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Urs Liska, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Kieren MacMillan, 2015/12/28
- Re: Strings as variable names, Malte Meyn, 2015/12/28
- Re: Strings as variable names, David Kastrup, 2015/12/28
- Re: Strings as variable names, Malte Meyn, 2015/12/28