Skip to content

To use a more intuitive and straightforward name/alias  #94

Description

@baldram

Hello Dear Maintainers, thank you for your work on this incredibly useful library!

I would like to propose an improvement in order to use a more intuitive name that directly relates to the functionality that the library provides.

I understand the origin of the name and its references to Haskell. However, from the perspective of Scala, not everyone has such roots, and without additional explanations, the name ado doesn't say much. A new person in the project, seeing something like this in the code, may feel lost. Seeing the word parallel or parallelize, they will easily understand what a given code block does.

If this is a good idea and is well received, creating an alias would likely be a solution, providing backward compatibility. Taking it a step further, standardising and adding the @deprecated annotation to ado would be an additional option to consider.

I would also refer to @szymon-rd's presentation from Scalar 2023, which teaches us that we may want our code to be easier to read and libraries designed to be intuitive:
https://www.youtube.com/watch?v=nA9gRGpOOJc

Finally, an example for applicative-for would look like that (using parallel, parallelize, or similar).

val run: IO[Int] =
  parallel {
    for {
      a <- doStuff1
      b <- doStuff2(a)
      c <- doStuff3
    } yield combine(a, b, c)
  }

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions