[
https://issues.apache.org/jira/browse/MINIFICPP-676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688655#comment-16688655
]
ASF GitHub Bot commented on MINIFICPP-676:
------------------------------------------
Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/440#discussion_r234008240
--- Diff: libminifi/include/io/Serializable.h ---
@@ -22,11 +22,36 @@
#include <string>
#include "EndianCheck.h"
#include "DataStream.h"
+
+namespace {
+ template<typename Integral, typename std::enable_if<
--- End diff --
Far less readable and godbolt and my i7 showed no benefit to this. It seems
like syntactical candy. Profiling shows no benefit whatsoever. Having functions
with specific functors makes it easy on the development side to specifically
type what we set. Your ticket "Type-unsafe template functions" I disagree. I
think this is more type unsafe and less easy for developers to read.
"Code duplication" I think this is true, but it results in perhaps some
easier development for some. I think we should keep this as is and what was
added is syntactical sugar with the potential negative that it can be more
confusing during development.
> Cleanup and fix serializable interface implementation
> -----------------------------------------------------
>
> Key: MINIFICPP-676
> URL: https://issues.apache.org/jira/browse/MINIFICPP-676
> Project: NiFi MiNiFi C++
> Issue Type: Improvement
> Reporter: Arpad Boda
> Assignee: Arpad Boda
> Priority: Minor
>
> Serializable interface contains a couple of issues:
> Type-unsafe template functions
> Code duplication
> Needless functions
> The goal of this ticket is to make the interface cleaner and simpler.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)