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

the usage of ^. seems redundant #3481

Closed
yegor256 opened this issue Nov 10, 2024 · 12 comments · Fixed by #3836
Closed

the usage of ^. seems redundant #3481

yegor256 opened this issue Nov 10, 2024 · 12 comments · Fixed by #3836
Assignees
Labels

Comments

@yegor256
Copy link
Member

We use ^. too often in .eo files. In the majority of situations this prefix may be skipped and the location of the object will be automatically found by the compiler.

@yegor256 yegor256 self-assigned this Nov 10, 2024
@yegor256 yegor256 added the bug label Nov 10, 2024
yegor256 added a commit that referenced this issue Nov 10, 2024
yegor256 added a commit that referenced this issue Nov 10, 2024
@yegor256
Copy link
Member Author

@maxonfjvipon compare this:

[] > foo
  [k] > bar
  bar 42 > x

and this:

[] > foo
  [k] > bar
  ^.bar 42 > x

The functionality here is not the same. Am I right?

@maxonfjvipon
Copy link
Member

@yegor256 yes, they are different

@yegor256
Copy link
Member Author

@maxonfjvipon I guess, the first snippet must be written as:

[] > foo
  [k] > bar
  $.bar 42 > x

Thus, we either have \xi.bar ($.bar) or \xi.\rho.bar (^.bar). Just bar means the first option. Am I right?

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Nov 10, 2024

@yegor256 yes, the first one, if it's not found it'll try to make the second one

@yegor256
Copy link
Member Author

@maxonfjvipon maybe it would be better to make our syntax more explicit: bar means $.bar and that's it. If ^.bar is meant, it should be written as such. No defaults. WDYT?

@maxonfjvipon
Copy link
Member

@yegor256 Actually yes, I think it's a good idea

@yegor256 yegor256 assigned maxonfjvipon and unassigned yegor256 Nov 11, 2024
@yegor256
Copy link
Member Author

@maxonfjvipon maybe the other way around would be better:

$.bar means \xi.bar (we use it rarely, as I see)

bar means \xi.\rho.\rho...bar (where it is found)

@maxonfjvipon
Copy link
Member

@yegor256 it should already work like this

@yegor256
Copy link
Member Author

@maxonfjvipon not really. If I use just bar it means \xi.bar:

[] > foo
  [k] > bar
  bar 42 > x

@maxonfjvipon
Copy link
Member

@yegor256 yes, if bar exists in the same scope, if it's not it'll try to find ^.bar, ^.^.bar and so on

@yegor256
Copy link
Member Author

@maxonfjvipon this code should not compile:

[] > foo
  [k] > bar
  bar 42 > x

instead, it should be written as such:

[] > foo
  [k] > bar
  $.bar 42 > x

maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Dec 30, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 31, 2024
bug(#3481): removed `globals-to-abstracts.xsl` + fixed indents in `to-java.xsl`
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 12, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 15, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 15, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 15, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 15, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 15, 2025
…d-of-lambdas

bug(#3481): use functions instead of lambdas
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 17, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 17, 2025
…-rhos

bug(#3481): removed almost all redundant `^.` + improved `tuple` and `seq`
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
maxonfjvipon added a commit to maxonfjvipon/eo that referenced this issue Jan 20, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 20, 2025
bug(#3481): removed redundant rhos in whole `eo-runtime` + optimized some objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants