And we need special treatment of patterns, messages, operators and braces. For operators and braces, I don't see any real chance. What we need is something like "normal code but with a different class". That doesn't seem to exist.
Symbols are highlighted as either "symbol" or "variable". The System symbols are highlighted as "keyword"
I think messages will probably have to go under the string context. The System stuff should maybe be tagged as a built_in since semantically that's really what they are...
WTF why do they explicitly support ReasonML? There is a technology with a niche user base...
Are we able to use that stuff, though? If so they explicitly have these two types:
operator reasonml operator such as pipe
pattern-match reasonml pattern matching matchers
Agreed. If we were able to explicitly match Module and Block level variables they even have module-access and friends in that section...
@halirutan for stuff like int_Integer inside a function def or friends I think the best option is title for the int, since in any other context I'd call int a symbol or variable, but that should be treated different semantically since those are pure symbols, not something bound by the Pattern object.
I'm gonna push for adding pattern-spec as a CSS class, though. Need to marshal some data since I know langs like Clojure work heavily off of pattern matching too.
@b3m2a1 But please remember that we only have a regex-lexer and no parser for the highlighting. So we won't be able to get e.g. Module variables highlighted. Even the highlighting of patterns is only possible on a very basic level.
@halirutan Yup totally understood. I also think having fewer classes is probably better than having a huge pool of them, as nicely customizable as that would be. So I'm in favor of having int_Integer all map onto some flavor of pattern class, with that being pattern-match if need be, but if we can convince them to add more sophisticated semantic classes, use one of those.
One thing worth thinking about is how one wants to do a:_Integer or b:_Integer?(...)
Do we highlight the entire pattern or stop at the :
@halirutan fine by me, that's also the kind of more sophisticated feature that it really doesn't matter all that much is super well-covered since the people who'd use it won't be thrown by the coloring
@b3m2a1 rm-rf implemented a kind-of-parsing in his Python highlighter that could correctly identify more stuff. But it was also more complicated and afaik not optimized for fast web crap.
@b3m2a1 Yes, since in the end, we didn't make the bold. But I remember there were quite some discussions about how to style the braces for Mathematica.
September 24 marked the release of the third edition of one of our most successful and widespread teaching tools: Cliff Hastings, Kelvin Mischo and Michael Morrison’s debut book, Hands-on Start to Wolfram Mathematica and Programming with the Wolfram Language. As the publishing assistant at Wolfram Research, I’ve spent the past few weeks working with the [...]