News for hackers. Stuff that matters.
Re:Functor-Oriented Programming by runeks on Wednesday October 11, 2017 @03:26PM (#15452622)
It would be nice to know what kind of code OP writes. Ie. are we talking application code or library code, and if it's libraries are we talking networking libraries, graphics libraries or math libraries?

Usually I find that Haskellers write very "low-level" code, ie. implement math abstractions or the like, while I prefer to write applications (in Haskell), where this abstraction technique may not be suitable.

Re:Functor-Oriented Programming by kmicklas on Wednesday October 11, 2017 @07:41PM (#15454523)
This style is plenty useful in "higher level" stuff. Consider Reflex: http://docs.reflex-frp.org/en/latest/
Re:Functor-Oriented Programming by runeks on Thursday October 12, 2017 @01:34AM (#15455884)
I don’t think I understand the reference. Reflex is a library, used to create applications.

The actual application code doesn’t seem to adhere to any type of functor-oriented programming, as far as I can see: http://docs.reflex-frp.org/en/latest/architecture.html

Re:Functor-Oriented Programming by kmicklas on Friday October 13, 2017 @04:33PM (#15469042)
> I don’t think I understand the reference. Reflex is a library, used to create applications.

Yes, but typical uses would be mobile apps and web apps, pretty "high level" stuff.

> The actual application code doesn’t seem to adhere to any type of functor-oriented programming, as far as I can see: http://docs.reflex-frp.org/en/latest/architecture.html

https://hackage.haskell.org/package/reflex-0.4.0/docs/Reflex...

The entire library abstracts over its implementation via the "Reflex" class. This is not _exactly_ the style advocated in the original post, but it's basically the same spirit.

Re:Functor-Oriented Programming by Bromskloss on Wednesday October 11, 2017 @07:19PM (#15454403)
> application code or library code

Do the two call for different styles?

Re:Functor-Oriented Programming by runeks on Thursday October 12, 2017 @01:31AM (#15455876)
I’d argue that they do to some extent.

With application code you’re interfacing with some real-life system, and need to adapt to all the corner cases of this, whereas with library code you might be implementing something entirely theoretical, where everything fits together perfectly in some abstraction because there are no corner cases to consider (it’s just a clean math concept).

With a math concept, the elegant concept already exists beforehand, and you just implement it. With application code, there might be 27 different but-ifs, and-also-remembers that you need to consider, where developing an elegant, coherent concept of the entire app is very challenging, or even impossible.

With some application code, I find I’m often the first one to make sense of it all, taking all the corner cases and creating a coherent model out of it, i.e. making it all fit into some well-defined abstraction. And then a new corner case appears and my model falls on the floor, and needs to be redesigned.

The definition of exact real arithmetic doesn’t change over time. There’s no customer who calls you up and asks you to add a feature that doesn’t fit into your existing model/abstraction.

Re:Functor-Oriented Programming by hyperpape on Wednesday October 11, 2017 @03:58PM (#15452904)
Low level stuff, at least in public: http://r6.ca/code.html