-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Description
It would be nice to highlight the types in array creation statements like Int[] the same way they are highlighted with Vector{Int}().
As @pfitzseb mentioned on Slack, simply highlighting everything before [] runs into problems with a[] after a = Ref{Int}(), to which he suggested to highlight only TitleCase.
Pros:
- extra highlighting makes the code easier to read
- consistency with highlighting types elsewhere
Cons:
- it will give a false negative for people who don't use TitleCase for their own types
- it will give a false positive for people who use TitleCase for their variables and use
Ref
Since the Julia manual suggests "modules and type names use capitalization and camel case: module SparseArrays, struct UnitRange." and the next logical step would to use everything but this for variables, one could argue that the cons shouldn't affect too many people.
Reactions are currently unavailable