You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Enis Soztutar (JIRA)" <ji...@apache.org> on 2017/03/29 18:13:41 UTC
[jira] [Commented] (RATIS-8) Avoid using Optional for data fields
in TransactionContext
[ https://issues.apache.org/jira/browse/RATIS-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947623#comment-15947623 ]
Enis Soztutar commented on RATIS-8:
-----------------------------------
+1 for this. Unlike in other languages, Optional is not a zero-cost abstraction in Java. And without pattern matching, etc, it is not worth it. My Optional usage was a failed experiment.
> Avoid using Optional for data fields in TransactionContext
> ----------------------------------------------------------
>
> Key: RATIS-8
> URL: https://issues.apache.org/jira/browse/RATIS-8
> Project: Ratis
> Issue Type: Improvement
> Reporter: Jing Zhao
> Assignee: Hugo Louro
>
> It's usually not recommended to use {{Optional}} as class fields. Let's use this jira to revisit the {{Optional}} usage in {{TransactionContext}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)