Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.toOptionT has inconsistent semantics. #81

Open
stewSquared opened this issue Oct 25, 2017 · 8 comments
Open

.toOptionT has inconsistent semantics. #81

stewSquared opened this issue Oct 25, 2017 · 8 comments

Comments

@stewSquared
Copy link
Contributor

This lifts something into an OptionT, so we should instead just use built-in lift. Or use constructors
The built-in .toListT converts an OptionT to a ListT, so .toListT.toOptionT.toListT.toOptionT doesn't result in the same initial type, but keeps adding layers of nesting.

Also, this just adds to a growing list of magic extension/methods and implicits.

@jodersky
Copy link
Member

kill it!

Also, are we using github issues to track things? That's cool!

@stewSquared
Copy link
Contributor Author

are we using github issues to track things?

I've always done so for core stuff, against company instructions to use JIRA org-wide. It's too much work to go to the SCALA JIRA board, and I hate not being able to cross reference PRs and Issues, which I do quite liberally.

Right now, the set of issues in Jira and Scala only overlap partially. Perhaps we should use GitHub projects, so we can have a board that tracks these issues across repos.

@vuspenskiy
Copy link
Contributor

vuspenskiy commented Oct 26, 2017

What for me, I hate to write the boilerplate which those methods replaced, especially when some "built-in" methods should work but because actually Scala's type-checker gives up too fast you ending up writing half-line of the type annotations.

PS: you may mention Jira issues' keys in the commit message and cross-reference tickets and PRs from Jira.

@vuspenskiy
Copy link
Contributor

Unfortunately, our previous convo about that with examples probably was on the driver-api repo PR which is removed now.

@stewSquared
Copy link
Contributor Author

stewSquared commented Oct 26, 2017

@vuspenskiy Yes, I do remember our previous convo (in slack, which probably reference gitHub). But there has to be a better way. At the very least, we should rename this to .liftToOptionT

Check out the cats documentation, for example: https://typelevel.org/cats/datatypes/optiont.html

@stewSquared
Copy link
Contributor Author

re: JIRA

My statements were a little strong. Yes, we can cross-reference, but it's much easier in GitHub. And since we're now using Pivotal, some of the benefit of having a Scala board is lost.

@vuspenskiy
Copy link
Contributor

@stewSquared I still hope that the consumer FE will return back to the mother-tracker :)

Although we definitely can consider Github issues for some stuff, but I'd love to check with product people (e.g., @ssoi) because I think they should have visibility into what we're doing and be able to plan too, at least for services' repos, and for libs we can add links to GH to relevant tickets in Jira.

@vuspenskiy
Copy link
Contributor

I'd love if idiom brackets implementations for Scala (e.g., https://github.com/aztek/scala-workflow) would lift expressions to the most nested level in the context automatically (what they can't do now), or maybe if we have our own master-monad (like Effectful one, or Computation in PDS UI) it could have concise constructors for all the different types and those conversations would go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants