[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why not update bash syntax while maintaining backwards compatibility
From: |
Eric Blake |
Subject: |
Re: why not update bash syntax while maintaining backwards compatibility? |
Date: |
Fri, 15 Feb 2019 09:51:53 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/15/19 9:26 AM, Vlad Vladov wrote:
> Hi,
> I think bash is great and more people should use it. However, it has a bit
> more picky syntax than many other modern languages and shell scripts. For
> example assigning a var requires having no spaces between = and var and
> assignment. I think this kind of thing can be fixed while still maintaining
> backwards compatibility since we would only need to accept space (0 or
> more) between tokens. If someone needs to write a script for older systems
> they can just follow a stricter syntax, while others can use the benefits
> of more lenient syntax. What are your thoughts?
Bad idea. Existing scripts can do:
echo = hi
and your proposal would change the semantics of that line from
outputting the string "= hi" to instead assigning to the variable named
$echo.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature