[ 
https://issues.apache.org/jira/browse/KAFKA-7654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16702887#comment-16702887
 ] 

Bruno Bieth commented on KAFKA-7654:
------------------------------------

I might sound redundant but this isn't a limitation of Java's type-system, it 
is a design issue. You could very well overload map so that one is strict about 
the mapper's return type, and another one takes a Serde as an extra parameter.
Think about how this would look like with reified generics: at best you could 
report a compilation error when the types aren't aligned, but to make this work 
you'll eventually need the extra Serde so you'll be back with an overloaded map 
function.

> Relax requirements on serializing-only methods.
> -----------------------------------------------
>
>                 Key: KAFKA-7654
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7654
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Bruno Bieth
>            Priority: Major
>
> Methods such as KStream#to shouldn't require a Produced as only the 
> serializing part is ever used.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to