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

Highlight attributes of a module or constructor #242

Open
SkyWorld117 opened this issue Mar 15, 2021 · 4 comments
Open

Highlight attributes of a module or constructor #242

SkyWorld117 opened this issue Mar 15, 2021 · 4 comments

Comments

@SkyWorld117
Copy link

In Python the attributes are highlighted as red and that seems a lot better.

@pfitzseb
Copy link
Collaborator

What's an attribute of a module or constructor? Do you have an example?

@SkyWorld117
Copy link
Author

SkyWorld117 commented Mar 15, 2021

What's an attribute of a module or constructor? Do you have an example?

struct foo
    a
    b
end
f = foo(1,2)
f.a
f.b

I think foo.a and foo.b are attributes of the constructor foo (or are they called with another name?) It's cool to have a and b in this case highlighted.

@pfitzseb
Copy link
Collaborator

Ah, I see. Not sure whether I like the idea much though.

Oh and re terminology: a and b are attributes (although I think I'd call them "fields") of f, which is an instance of foo. foo(1,2) is a call to the constructor.

@SkyWorld117
Copy link
Author

Maybe we can leave this issue open and see if others like this idea or not.

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

2 participants