Rename Latexise to Latexize, so the library has one spelling - #842
Conversation
`Stringize` and `Latexise` do the same kind of thing, are declared next to each other and are overridden per node in the same files -- one spelled American, one British. Everything else public is `-ize`: `Stringize`, `Factorize`, `Serialize`, `Deserialize`. `Latexise` and `ILatexiseable` were the only members a caller had to remember the other spelling for. Renamed across every surface the name reaches: the method and its 61 overrides, `ILatexiseable`, the `string` extension, `MathS.Latex`'s parameter, the native entry point `entity_latexise`, the C++ wrapper's `Entity::Latexise`, the F# `latexise`, and the notebook extension. No forwarding member is left behind -- this release removed 28 members that accumulated exactly that way, so adding a permanent one here would undo that. `Sources/Samples/SampleNet5` is deliberately untouched: it compiles against `PackageReference AngouriMath 1.4.0`, not against this source, so the old name is correct there until it is repointed at 2.0. `MathS.Quantum.Factorise` keeps its spelling. Renaming it to `Factorize` would give the library two unrelated public `Factorize` methods, which is worse than the inconsistency; it wants a distinguishing name instead, and that is not decided here. Also corrects a claim in BREAKING-CHANGES.md that nothing parses LaTeX. CSharpMath does, which is what #822 established and what AGENTS.md already says. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#841 landed the public-surface baseline after this branch was cut, so the rename invalidated it. Regenerated with AM_UPDATE_PUBLIC_API=1: 68 lines change and every one of them is a Latexise entry becoming a Latexize one. This is the test doing its job -- a rename of 61 overrides is exactly the kind of change that should not pass silently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
d958901 to
84cd53b
Compare
|
Reviewed the rename itself as mechanical work — it is complete and consistent.
Worth noting that One thing to decide before merging: there is no shim
Measured against
(Correcting my own earlier count on #821: I said five call sites. Three of them are AngouriMath's API; the rest are CSharpMath's own abstract method, which is unaffected.) The asymmetry: a method rename can be softened by keeping an So my recommendation is to ship it hard, as written here — the half-measure costs more than it buys, 2.0 is the release for exactly this, and the document is honest about it. What I would add is not code but a heads-up to CSharpMath, since the fix on their side is three lines and they cannot act on a change they have not seen. The one thing I would not do is add the shim for the method only. That leaves |
Closes #840, taking option 1 from that issue.
Why
StringizeandLatexisedo the same kind of thing, are declared next to each other, and are overridden per node in the same files. One is American, one is British. Measured on9ae9a845:override string …StringizeLatexiseEverything else public is
-ize—Stringize,Entity.Factorize,Integer.Factorize,Serialize,Deserialize.LatexiseandILatexiseablewere the only members a caller had to remember the other spelling for.What changed
Every surface the name reaches, not only the C# method:
Latexise()Latexize()ILatexiseableILatexizeable"x + 1".Latexise()"x + 1".Latexize()MathS.Latex(ILatexiseable)MathS.Latex(ILatexizeable)entity_latexiseentity_latexizeEntity::Latexise()Entity::Latexize()latexiselatexizeNo forwarding member. #832 has just finished deleting 28 members that accumulated as forwarders; adding a permanent one here would undo that on the same day.
MathS.Quantum.Factorisedeliberately keeps its spelling — renaming it toFactorizewould give the library two unrelated publicFactorizemethods (expression factoring onEntity, tensor factorisation on a quantum state), which is worse than the inconsistency. It wants a distinguishing name, which is not decided here.One file deliberately not renamed
Sources/Samples/SampleNet5/Program.cskeepsLatexise. It compiles againstPackageReference AngouriMath 1.3.0, not against this source, so the old name is the correct one there until the sample is repointed at 2.0. Renaming it broke the build, which is how this was found.Also fixed
BREAKING-CHANGES.mdclaimed "nothing parses LaTeX". CSharpMath does — that is what #822 established and whatAGENTS.mdalready says. Corrected rather than left standing in the release notes.Measured
Every project that builds on Linux, built individually:
AngouriMathUnitTestsAngouriMath.FSharpAngouriMath.InteractiveAngouriMath.CPP.ExportingAngouriMath.Terminal.LibSampleNet5Downstream, and the order it has to happen in
CSharpMath.Evaluationis affected in four files — and more deeply than a call-site count suggests: itsMathItemrecord implementsILatexiseableand overridesLatexise().It cannot be fixed first, or in parallel. It consumes
<PackageReference Include="AngouriMath" Version="1.4.0" />, so a rename there does not compile until 2.0 is on NuGet. The order is forced:🤖 Generated with Claude Code