On Monday, 7 December 2015 at 16:15:46 UTC, Andrei Alexandrescu wrote:

These are still expressible without a DSL: BigO(Atom("array[].walkLength") + Atom("r.walkLength")) etc.


We can remove the use of strings if we tag walkLength with BigO:

// this:
BigO(Atom("array[].walkLength") + Atom("r.walkLength"))

//become this:
@(complexity!(array[].walkLength) + complexity!(r.walkLength))

Or if we rename complexity to bigO:

@(bigO!(array[].walkLength) + bigO!(r.walkLength))

Reply via email to