• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Functional Design and Architecture - FP Collections

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are many Scala collections like List, Set, Priority Queue, etc. They are in immutable and mutable forms and they are "functional". However, they do not support the effect F[_] out of the box. Fortunately, Cats Effect provide some of the commonly used collection like queue, dequeue, etc. For the developers, what are the options they have to get an effect-ful collection like Map and List, without writing overly complicated collections that support the effect F[_]? How do other pure FP languages developers manage in general?
 
Author
Posts: 27
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

T H Lim wrote:There are many Scala collections like List, Set, Priority Queue, etc. They are in immutable and mutable forms and they are "functional". However, they do not support the effect F[_] out of the box. Fortunately, Cats Effect provide some of the commonly used collection like queue, dequeue, etc. For the developers, what are the options they have to get an effect-ful collection like Map and List, without writing overly complicated collections that support the effect F[_]? How do other pure FP languages developers manage in general?



Hi, thank you for your question!

I'm afraid, I'm unable to answer it any expertly. I was never involved into work on collections and didn't have any chance to learn Scala.

What I see is our terminology differs a bit. In Haskell, we don't call F[_] an effect, it's a type parameter of some data structure, for example:



We can make it to be a Functor, and even a Monad if we wish. Not sure if this fits into the "simple enough" characteristics though.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic