A shorter way to write polynomial evaluation, with a comprehension
Gotta say, I'm amused that the "shorter way" is 3 lines longer than the code it replaces. :-)
Can you add this as a third option (next to poly and poly_reduce)? Having them next to each other makes it easier to compare.
@benlaurie, I'm presuming it's clear, but just in case not: the shorter way includes some set-up infrastructure code that wouldn't be duplicated per primitive. ;-)
@franziskuskiefer, could it be nicer to use Git branches instead of dumping alternatives in single files? I like to take advantage of version-control metadata instead of duplicating part of its functionality within single revisions.
On 2 March 2018 at 16:31, Adam Chlipala [email protected] wrote:
@benlaurie https://github.com/benlaurie, I'm presuming it's clear, but just in case not: the shorter way includes some set-up infrastructure code that wouldn't be duplicated per primitive. ;-)
@franziskuskiefer https://github.com/franziskuskiefer, could it be nicer to use Git branches instead of dumping alternatives in single files? I like to take advantage of version-control metadata instead of duplicating part of its functionality within single revisions.
I'd say that given these are likely going to stick around for a while, having to maintain 3 different branches for each infrastructure change seems like a bad choice.
If we were going to choose one right now, then maybe.