8000 Allowing always_before and always_after blocks inline · Issue #181 · sylefeb/Silice · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allowing always_before and always_after blocks inline #181

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

Open
sylefeb opened this issue Sep 14, 2021 · 0 comments
Open

Allowing always_before and always_after blocks inline #181

sylefeb opened this issue Sep 14, 2021 · 0 comments
Assignees

Comments

@sylefeb
Copy link
Owner
sylefeb commented Sep 14, 2021

In some cases (see discussion here for instance) moving code to always blocks is detrimental to readability, as the semantics get split and spread in different places.

A straightforward possibility would be to allow inline always blocks. In that case all always blocks would be concatenated together, into one global always_before and one always_after block.

Upsides:

  • we improve readability and maintainability (by avoiding missing side effects of the always blocks defined outside)

Potential downsides:

  • different always blocks may interact in ways that will not be obvious at first sight (e.g. assigning to same variables)
  • inline always blocks may be confusing?

Syntax highlighting can likely help with identifying the blocks clearly. The linter could warn on non-conditional conflicting assignments?

@sylefeb sylefeb self-assigned this Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0