What's missing
quickr's value proposition rests on a promise: a compiled function behaves
like the R function it was compiled from. Nothing in the package writes that
promise down, or says where it stops holding.
- There is no
vignettes/ directory and no VignetteBuilder in
DESCRIPTION — the package has no long-form documentation at all.
README.md covers installation, usage, declare() syntax, and benchmarks.
It does not state the value/type/shape contract, and mentions no divergence
from R.
- The reference docs describe individual functions, so a rule that spans
operations — "which result type do you get when modes are mixed", "when is
a shape mismatch a compile error and when is it a runtime check" — has no
home.
The result is that every semantic question has to be answered by reading
R/r2f-*.R or by experiment.
Why it matters
This series makes the gap much more visible, because it settles a long list
of semantic questions and several answers are deliberately not R's:
- R-style partial recycling is rejected rather than implemented.
- 1×1-matrix operands follow R's arithmetic/comparison split, and at
symbolically-known lengths quickr errors where R would recycle.
- A variable's type is fixed at first binding, so
x <- x + 0.5 on an
integer x is a compile error.
NA is not supported; zero-length operands combine only with scalars.
- Complex values are elementwise-only — type joins and linear algebra
refuse them.
- Subscript bounds checking is deliberately partial: literal subscripts are
validated against known extents, but a symbolic scalar subscript x[i] is
unchecked at run time, matching Fortran's contract rather than R's. That
is a considered performance decision — per-subscript guards in hot loops
defeat the point of a compiler — and a decision like that has to be
documented to be defensible.
Users hitting any of these need to be able to tell "deliberate divergence,
here's why" from "bug, please report it". Right now they cannot.
Expected content
A vignette that states, once:
- The contract.
quick(f)(x) returns exactly what f(x) returns — same
values, same typeof(), same shape — or raises an error. Plus the
compile-error/runtime-check split: refuse at compile time when the answer
is knowable then, guard at run time when it needs runtime values.
- Result types. The promotion order and a per-operation result-type
table, plus the fixed-variable-type rule.
- Shapes. The three verdicts (provably fine / provably wrong / checked
at run time), the elementwise compatibility table, the supported recycling
forms, and linear-algebra conformability.
- Differences from R, each with its rationale, so the deliberate
divergences are on the record.
It should carry no build-time cost: chunks not evaluated, outputs pasted from
verified runs, so building the vignette needs no Fortran toolchain and adds
nothing to R CMD check.
What's missing
quickr's value proposition rests on a promise: a compiled function behaves
like the R function it was compiled from. Nothing in the package writes that
promise down, or says where it stops holding.
vignettes/directory and noVignetteBuilderinDESCRIPTION— the package has no long-form documentation at all.README.mdcovers installation, usage,declare()syntax, and benchmarks.It does not state the value/type/shape contract, and mentions no divergence
from R.
operations — "which result type do you get when modes are mixed", "when is
a shape mismatch a compile error and when is it a runtime check" — has no
home.
The result is that every semantic question has to be answered by reading
R/r2f-*.Ror by experiment.Why it matters
This series makes the gap much more visible, because it settles a long list
of semantic questions and several answers are deliberately not R's:
symbolically-known lengths quickr errors where R would recycle.
x <- x + 0.5on aninteger
xis a compile error.NAis not supported; zero-length operands combine only with scalars.refuse them.
validated against known extents, but a symbolic scalar subscript
x[i]isunchecked at run time, matching Fortran's contract rather than R's. That
is a considered performance decision — per-subscript guards in hot loops
defeat the point of a compiler — and a decision like that has to be
documented to be defensible.
Users hitting any of these need to be able to tell "deliberate divergence,
here's why" from "bug, please report it". Right now they cannot.
Expected content
A vignette that states, once:
quick(f)(x)returns exactly whatf(x)returns — samevalues, same
typeof(), same shape — or raises an error. Plus thecompile-error/runtime-check split: refuse at compile time when the answer
is knowable then, guard at run time when it needs runtime values.
table, plus the fixed-variable-type rule.
at run time), the elementwise compatibility table, the supported recycling
forms, and linear-algebra conformability.
divergences are on the record.
It should carry no build-time cost: chunks not evaluated, outputs pasted from
verified runs, so building the vignette needs no Fortran toolchain and adds
nothing to
R CMD check.