Filip Pizlo (2013-09-05T06:27:51.000Z)
domenic at domenicdenicola.com (2013-09-09T01:45:27.728Z)
On Sep 4, 2013, at 11:17 PM, Steve Fink <sphink at gmail.com> wrote: > This general argument bothers me slightly, because it assumes no opportunity cost in making something free(ish). Even if you can demonstrate that allowing X can be made fast, it isn't a complete argument for allowing X, since disallowing X might enable some other optimization or feature or semantic simplification. Such demonstrations are still useful, since they can shoot down objections based solely on performance. > > But maybe I'm misinterpreting "...sufficient to conclude...that there is no need to constrain [the feature]." Perhaps you only meant that there is no need to constrain it *for reasons of performance*? If so, then you only need consider the opportunity cost of other optimizations. Yeah, I might have overstated this. My gut intuition is that performance shouldn't be a great reason for deciding PL features to begin with. But in the cases where you have the urge to add or remove a feature solely because of performance, I think that a sufficient counterargument is to show that there exists some sensible optimization strategy that obviates the feature (or its removal). And yes, opportunity cost ought to be considered. If you can make such a counterargument then probably the feature should be judged on its software engineering merits and not on performance merits. My experience implementing free-if-unused custom properties on typed arrays was that it was a small hack with limited cost - I just relied on a lot of preexisting nastiness that we have to have, that was already there to deal with DOM semantics and to enable similar "free-if-unused" features for other objects.