[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re: [PATCH 0/4] Add import builtin
From: |
Koichi Murase |
Subject: |
Re: Re: [PATCH 0/4] Add import builtin |
Date: |
Wed, 8 May 2024 16:46:21 +0900 |
2024年5月8日(水) 7:12 Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>:
> > a language that has no support for namespaces, awkward scoping rules,
> > a problematic implementation of name references, and so on.
>
> I could at least attempt to address those issues.
I don't think these are requests to you. Those topics (in particular
the scoping and namerefs) are the ones that repeatedly pop up in the
bug-bash list. Each single topic could be a project that takes years.
Also, if you start to implement those (and the `load once' feature), I
need to go back to the arguments of the standard module manager. There
are existing module managers implemented by shell functions, which are
based on years of practices. Then, you cannot ignore them.
> Namespacing could be as simple as prepending the module name
> to the symbols that are being created.
I don't think that works consistently. The shell language is
inherently dynamic, so it isn't possible to resolve everything
statically at the loading time. What happens when a function is called
by its name stored in a variable passed through the caller's
parameter? What happens when a variable is referenced by its name
similarly? The behavior is unpredictable.
Also, if you consider implementing a namespace, I think you should
first check the ksh's implementation of namespace and learn what would
be the good points and what could be the practical problem there.
- Re: Re: [PATCH 0/4] Add import builtin, (continued)
- Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/06
- Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/06
- Re: [PATCH 0/4] Add import builtin, Kerin Millar, 2024/05/06
- Re: [PATCH 0/4] Add import builtin, Phi Debian, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Kerin Millar, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Phi Debian, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/07
- Re: Re: [PATCH 0/4] Add import builtin,
Koichi Murase <=
- Re: Re: Re: [PATCH 0/4] Add import builtin, Koichi Murase, 2024/05/08
- Re: Re: Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/08
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/08
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/08
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Lawrence Velázquez, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/07
- Re: [PATCH 0/4] Add import builtin, Chet Ramey, 2024/05/08
- Re: Re: [PATCH 0/4] Add import builtin, Matheus Afonso Martins Moreira, 2024/05/08