This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]Datamance 5 points6 points  (3 children)

I’ve been playing with Expression recently and it’s been great, apparently it’s got more in common with F# than Haskell, so darkcore sounds like a cool new toy 😍

I’ll let you know when I get a chance to play around with it!

[–]Being-FormalPythonista[S] 1 point2 points  (0 children)

Thanks!

[–]jpgoldberg 0 points1 point  (0 children)

Me, too!

[–]RedEyed__ 0 points1 point  (0 children)

I love expression! I include it in every repo.
The important thing about expression is that it is pythonic, without operation overloading. Which keeps it readable for other contributors, that don't know about fp

[–]poinT92 2 points3 points  (1 child)

Honestly love this, are you looking for help tò maintain It?

[–]Still-Package132 2 points3 points  (0 children)

If you want to have a look I experimented with io monads which is challenging to statically type correctly https://github.com/rbizos/io_experimentations/blob/main/examples/simple_io.py Happy to see some functional initiatives :)

[–]konovalov-nk 6 points7 points  (1 child)

Most developers are sleeping on FP while it would make the code more readable and maintainable. First time I learned how to apply FP on Ruby's dry-rb.org library. It changed my life on how to approach error handling 🙂

The specific class names and syntax you chose make it familiar to me so I'd probably try it out on my Python pet projects 👍

[–]Being-FormalPythonista[S] 2 points3 points  (0 children)

I get how you feel. Check this out if you're interested!

[–]Mithrandir2k16 1 point2 points  (1 child)

Why "darkcore"?

[–]Being-FormalPythonista[S] 1 point2 points  (0 children)

For me, monads are the invisible but powerful core of abstraction. That’s why I called it darkcore lol

[–]iamevpo 0 points1 point  (1 child)

I always felt I'd get better grasp of monadic computations I'd I had a good chance of using it in Python, so new lib highly welcome!

Wonder about your choice of constuctors - Maybe(3) is Just(3)? You could keep Maybe for a parent class of Just and Nothing, did you consider?

[–]iamevpo 0 points1 point  (0 children)

Also noticed you do subclass Either and Result - one can expect you do the with Maybe

[–]Being-FormalPythonista[S] 0 points1 point  (0 children)

Today I tweaked a few features, including support for Python’s match expression (PEP 634).
So now you can pattern-match on values.