DEV Community

loading...

Discussion on: Impeachment in a functional way

Collapse
t4rzsan profile image
Jakob Christensen Author • Edited

Thank you for your reply. You made my day for suggesting Either 🤣🤣🤣. Now I feel like rewriting the whole thing with Left and Right.

I use Wlaschin's syntax for >=> while Milewski writes it like you do in his section on Kleisli categories (although in Haskell). The two implementations must be equal because of partial application (?). In a way I actually like your way better because it is very clear that the operator returns a function.

I hardly ever use point free-free programming since it makes debugging so much harder. Microsoft has a couple of guidelines on that.

Calling me an F#-developer is a bit of a stretch though and I am still learning. None of my colleagues have seen the light and they all use C#. So I am yet to write a complete project in F# which is such a shame.

Thanks for reading! I look forward to reading your articles on F#!

Collapse
shimmer profile image
Brian Berns • Edited

I tend to agree with you (and Microsoft) about point-free style, although there are some cases where it's absolutely essential (e.g. parser combinators). I even wrote a blog post about this here. However, in the function case, the compiler desugars it back to your original code with an argument called _arg1, so it can be easily inspected in a debugger.

I hope you keep going in your F# journey. I was/am in a similar situation, although I've at least convinced my colleagues to allow a few of my F# projects side-by-side with their C# projects. Thanks to .NET, they interop without problems.

Thread Thread
t4rzsan profile image
Jakob Christensen Author

Thanks for the tip on point-free style.

I have been mixing C# and F# projects in the same solution as well and the interop works perfectly as you say but I find the tooling support to be troublesome. If you use "Find all references" or "Go to definition" in Visual Studio I cannot get it to work across different project types. Did you find a solution for that?

Thread Thread
shimmer profile image
Brian Berns

I've had the same experience. Tooling support is definitely not perfect, but Visual Studio is still the best IDE out there, I think.

Thread Thread
t4rzsan profile image
Jakob Christensen Author

VS is definitely the best. I have been doing some macOS/iOS stuff lately and XCode is a pain compared to VS.

Forem Open with the Forem app