bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH 0/4] Add import builtin


From: Lawrence Velázquez
Subject: Re: [PATCH 0/4] Add import builtin
Date: Sun, 05 May 2024 15:32:04 -0400
User-agent: Cyrus-JMAP/3.11.0-alpha0-417-gddc99d37d-fm-hotfix-20240424.001-g2c179674

On Sun, May 5, 2024, at 12:35 AM, Matheus Afonso Martins Moreira wrote:
> I agree that a one line of code reduction is underwhelming
> but that's not the only reason to include it. The users are the
> main beneficiaries. This gives users a simple way to load
> modules without using any module managers at all.
> From the perspective of the user, it potentially reduces
> thousands and thousands of lines of code.

I fail to see how this could possibly save "thousands and thousands
of lines of code".

You keep talking about this proposal as if it would spark a huge
sea change in script maintenance, but I just don't see it, at all.
AFAICT the only thing this proposal addresses is your personal
hangup about using PATH to find sourced files; it doesn't help with
authoring reusable "libraries".  The sourced files that can be
written with your feature available are exactly the same as the
ones that can be written right now.

Much like the periodic requests for XDG-organized startup files, a
BASH_SOURCE_PATH might be convenient but is not groundbreaking and
probably doesn't merit significant changes to the shell.  I'm not
even convinced it merits a new "source" option.

-- 
vq



reply via email to

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