Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

~leave_here alias for 'not is_included' #120

Open
majidaldo opened this issue Oct 19, 2020 · 6 comments
Open

~leave_here alias for 'not is_included' #120

majidaldo opened this issue Oct 19, 2020 · 6 comments

Comments

@majidaldo
Copy link
Contributor

I rely heavily on not is_included to process my devenvs. I'm assuming that this is the way it's expressed in use cases (to be useful). But thinking about the negation of inclusion is too much to think about. I find myself always having to think about it. I think it's just simpler to think about the intent of its use.

@prusse-martin
Copy link
Member

Yes.
Our brains have problems to process negatives.

leave_here...
The first thing that come to my mind is an is_root but I think it is much similar to root(anoter var already present).
@nicoddemus do you have any suggestion about a variable name?

As a temporary workaround you could add (maybe at the top) {% set leave_here = not is_included %} and then use leave_here as a variable normally.

@nicoddemus
Copy link
Member

@nicoddemus do you have any suggestion about a variable name?

Not at the moment :/

@majidaldo
Copy link
Contributor Author

Yes.
Our brains have problems to process negatives.

leave_here...
The first thing that come to my mind is an is_root but I think it is much similar to root(anoter var already present).
@nicoddemus do you have any suggestion about a variable name?

As a temporary workaround you could add (maybe at the top) {% set leave_here = not is_included %} and then use leave_here as a variable normally.

Yes. I already do something like that #112 (comment)

@majidaldo
Copy link
Contributor Author

majidaldo commented Oct 20, 2020

Well, root should be ~root_pth.

To use 'root' language, at_root, inclusion_root, at_inclusion_root? The user would have to understand the processing of the devenvs as a tree where each devenv is a 'root' for included devenvs (not saying it's a bad thing).

Yeah there are two 'tree' concepts to deal with: the filesystem and the inclusion tree.

@prusse-martin
Copy link
Member

My bad, you are right root is relative to the current devenv file.

Maybe we could deprecate the root variable naming and name it file_location (or devenv_file_location) since there is a request to support referencing devenv files from the web and use the alias is_top_level = not is_included to avoid root related terms.

@majidaldo
Copy link
Contributor Author

My bad, you are right root is relative to the current devenv file.

Maybe we could deprecate the root variable naming and name it file_location (or devenv_file_location) since there is a request to support referencing devenv files from the web and use the alias is_top_level = not is_included to avoid root related terms.

this_file_path, and this_file_dir.
and
is_base

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants