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

Do we represent package objects in PHI correctly? #3794

Open
maxonfjvipon opened this issue Jan 8, 2025 · 2 comments
Open

Do we represent package objects in PHI correctly? #3794

maxonfjvipon opened this issue Jan 8, 2025 · 2 comments

Comments

@maxonfjvipon
Copy link
Member

maxonfjvipon commented Jan 8, 2025

This ticket gave me an idea, that our package objects like org or eolang are not correctly represented in PHI:

{[
  org -> [
    eolang -> [...],
    L> Package
  ]
]}
  1. They have \lambda asset and bound attributes, like org has attribute eolang which is wrong (?)
  2. The presence of the bound attribute makes the presence of \lambda unnecessary
  3. The \lambda is supposed to return the object, but what object does package object \lambda return?

@yegor256 WDYT?

@yegor256
Copy link
Member

yegor256 commented Jan 8, 2025

The \lambda is supposed to return the object, but what object does package object \lambda return?

@maxonfjvipon this is the key question. Indeed, lambda is not necessary here, since we already have all attributes in place. Moreover, when we convert two .eo files to .phi, we get this:

{[
  org -> [
    eolang -> [...],
    L> Package
  ]
]}

and then in another file:

{[
  org -> [
    foo -> [...],
    L> Package
  ]
]}

How can they be merged? According to what rules? I believe, we don't have them defined anywhere.

@maxonfjvipon
Copy link
Member Author

Notes:

  1. we use lambdas in package objects only as indicators so we can convert them to +package meta and convert to java in a right way
  2. if we remove these lambdas - objects org and eolang should be converted to regular java classes and maybe this is what we need
  3. maybe we can introduce an XSL transformation that would convert all abstract objects without bound attributes to packages

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

2 participants