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

Inconsistent highlighting of DataTypes #21

Closed
garborg opened this issue Jul 8, 2015 · 2 comments
Closed

Inconsistent highlighting of DataTypes #21

garborg opened this issue Jul 8, 2015 · 2 comments

Comments

@garborg
Copy link
Contributor

garborg commented Jul 8, 2015

Highlighting every other of the following is worse than no highlighting at all:

x = [Int, Bool, Vector, Array, Integer, FloatingPoint, DataArray, DataFrame]

Seems like consistent options are:

  • Highlight every type exported from Base
  • Go farther highlighting everything that's proven to be a type by syntax (e.g. x = Union{...............})
  • Both of the above
  • Remove 'storage.type.julia'

I think the latter is the cleanest and means the least distracting false alarms, but I wouldn't be that surprised if others like the second option.

Thoughts?

@sglyon
Copy link
Contributor

sglyon commented Jul 8, 2015

If the second option is doable without false positives, I think people might like it.

Otherwise I agree that 4 is the cleanest.

To try to get 2, we might just impose the official naming conventions from the contributing guide and say something like (A-Z\w+) is a type name (the initial A-Z enforces the upper-camel-case guideline), but I suspect that some users wouldn't like that. Also, it would be hard to disambiguate module and type names if we tried that.

@garborg
Copy link
Contributor Author

garborg commented Jul 9, 2015

I think this is closed by #22.

I think you're right about disambiguating module and type names, and possibly constants (in the case of single letters or acronyms). Also, type highlighting gets really loud if all the types being passed around as values are highlighted, and highlighting the type in x = Union{Int, UInt} but not x = Int seems a little strange, for example.

@garborg garborg closed this as completed Jul 9, 2015
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