Profile picture
Rob Rix‎ @rob_rix
, 5 tweets, 2 min read Read on Twitter
@a_cowley So to be clear, I haven’t benchmarked this, but I can’t imagine it’s great if you’re calling/replacing those higher-order functions a lot. Thunks aren’t free. But that’s going to be the case with anything where you’re traversing trees/replacing subtrees repeatedly, too.
@a_cowley And some things, like repeated substitutions (inlining!) of globals, can be performed by composing onto the function in O(1), deferring the actual *work* just like with difference lists.
@a_cowley I also haven’t yet done any sort of optimization passes or similar yet; doing that kind of graph traversal/transformation may be more difficult than e.g. unification has been. But I’m hopeful!
@a_cowley All in all I feel pretty happy with using it instead of a de Bruijn indexed representation, especially since I don’t need to think about capture avoidance in global substitution *at all* (since lambdas can’t bind globals).
@a_cowley I wonder (idly) if the repeated construction/elimination of the higher-order functions during unification could be asymptotically improved by the Reflection Without Remorse techniques, i.e. using a type-aligned queue instead of a function per se.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Rob Rix‎
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!