These are chat archives for evhub/coconut

20th
Aug 2017
Evan Hubinger
@evhub
Aug 20 2017 23:09
@kentaro0919 There's no way to specify that a function is pure, but Coconut provides lots of tools to make it easy to write pure functions! Since Coconut is a superset of Python, though, it can't really enforce pure functions, though.
@ShalokShalom Yeah, those are both legitimate complaints from the Twisted people. Supporting metaclasses is really easy (just raised #307 to track it), but figuring out whenever a Python 2 function expects a str instead of a unicode is really hard. Coconut modifies all the built-ins on Python 2 to expect unicode, but it can't do that for the whole standard library.
Evan Hubinger
@evhub
Aug 20 2017 23:15
Also, you can definitely do pattern matching inside of function parameters! Though you can't do recursion inside of function parameters, unless you use a guard, I suppose. Can you give me an example of what you're trying to do?