The token a function node prints and parses as, plus the one rendering built from it.
A separate trait rather than members on _Function, and the reason is binary compatibility (issue F_0016 step 0). Putting an abstract name on the published _Function would oblige every external subclass to supply it, which MiMa correctly reports as a break — an abstract val is no better, since a Scala val compiles to an accessor method and the JVM has no abstract fields. A new trait is additive, and mixing it into an existing class adds an interface rather than an obligation on anyone else's code, so nothing outside the library can be broken by it.
Mix it into a node whose printed form is exactly name(child, child, …).
The token this function prints and parses as — "exp", "tan", "Gamma".
The token this function prints and parses as — "exp", "tan", "Gamma".
Stated per node rather than derived, and that is deliberate. A case class knows its own name through productPrefix, so this could have defaulted to it — but Exp prints exp while Gamma prints Gamma (capitalised by 4.K so the lower-case name stays free as a variable), and Tg prints tan. Neither productPrefix nor its lower-cased form is right for all three, and a default that is right for most nodes and silently wrong for a few is the confidently-wrong failure this codebase declines everywhere — here it would mean a session saving under one spelling and reloading under another.
Renders as name(arg, arg, …) — the grammar's own call syntax, so it re-parses.
Renders as name(arg, arg, …) — the grammar's own call syntax, so it re-parses.
One definition replacing 41 identical hand-written overrides.
_Functional is a separate hierarchy and deliberately does not mix this in. Its nine nodes — _Derivative, the integrals, _Limit and the transforms — print a binder that children excludes on purpose, so rendering from children alone would emit derive(e) for what is derive(e, v) and silently lose the variable. They keep their own toString, and would gain nothing from a name either: their LaTeX is \int, \frac{d}{dx} and \lim, bespoke however the token is spelled.