
On Tue, Oct 26, 2021, 1:08 PM Chris Angelico <rosuav@gmail.com> wrote:
No, I agree. We have to still be able to introspect them.
At the moment, when you look at a function's defaults, they are all values. With this change, some would be values and some would be markers saying that code would be executed.
So why on earth NOT make these general "deferred" objects that can be used in other contexts?! Effectively that's what you need them to be. Going out of your way to make sure they aren't used outside function signatures seems backwards. I used the construct `defer: some_code`. Marc-André spells it without the colon. I think now I like his better, but was initially emphasizing the similarities with lambda. Punctuation would be fine too. But the general idea is that a first class object is more useful, whether it's spelled: do_later = defer: foo(bar(baz)) do_later = defer foo(bar(baz)) do_later = $( foo(bar(baz)) ) Or some other way... I actually don't hate the bash-inspired punctuation as much as I'm sure everyone else will... But I really just mean to suggest "some punctuation."