Hey #PHP. When you use union and intersection types, do you include spaces?
(RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)
Hey #PHP. When you use union and intersection types, do you include spaces?
(RT for reach, etc. This is survey data for @phpfig. If you know of any official policies by major projects already, please note/link in the replies.)
@Crell @phpfig for everything that has more than a simple & or | chain having spaces is such an accessible thing for me, allowing me to parse the blob of symbols.
If my editor would highlight the braces and symbols differently from the text I would have more of a chance without spaces, but as it is, it's very annoying. Especially because they need to restate the compound types everywhere, not just define them once like in TS.
> having spaces is such an accessible thing for me, allowing me to parse the blob of symbols
For me it's the other way around: No spaces, please.
Without spaces the type visually appears as a single token and when seeing the space I know the variable name comes next. For me the variable name is the most important piece of information.