Iota
jmh530
john.michael.hall at gmail.com
Fri Aug 5 17:03:35 UTC 2022
On Friday, 5 August 2022 at 15:20:12 UTC, Paul Backus wrote:
> [snip]
>
> There has to be some deeper principle that lets you decide
> which analogies are valid and which aren't. Like, what is our
> purpose for including `iota` in Phobos, when we already have
> more general facilities like `recurrence`, `sequence`, and
> `generate`; and does adding a particular feature to `iota`
> serve that purpose?
>
> In this case I think your conclusion is correct, but the
> reasoning behind it is iffy.
This reminds me of Coase's "Nature of the Firm", which looks at
the question of when firms should do things within the firm or
contract them outside. If your language only has low level
primitives that can build up everything, then there is an
additional cost for users to figure out how those things combine.
Higher level API (or more generality) can help reduce the cost
that users face, but also have a trade-off by making the code
base more difficult to maintain, etc. What you're suggesting puts
all the cost on the user. I would argue that there is a
trade-off, such that it makes sense in some places to offer
higher level API for common use cases.
More information about the Digitalmars-d
mailing list