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

Exceptions vs Try[T] #7

Open
tupol opened this issue May 2, 2019 · 1 comment
Open

Exceptions vs Try[T] #7

tupol opened this issue May 2, 2019 · 1 comment
Labels
question Further information is requested

Comments

@tupol
Copy link
Owner

tupol commented May 2, 2019

In the early versions the scala-utils and spark-utils were Try[T] centric, meaning that everything that could fail returned a Try[T]. At some point, observing how some developers were using it, I decided that it might be easier to throw exceptions, even though my functional blood was boiling a little.

Question Should we go for a more functional, no side effects approach or should we keep throwing exceptions?
In a sense we are also logging, so we have few pure functions, so this question is actually not as easy as it seems.

@tupol tupol added the question Further information is requested label May 2, 2019
@tupol
Copy link
Owner Author

tupol commented May 3, 2019

Probably a local type, maybe isomorphic to Try[T] that expresses better the application return types should be a good choice. However, it all boils down to the most difficult part of software engineering, naming things :)

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

No branches or pull requests

1 participant