mgroovy commented on a change in pull request #1660:
URL: https://github.com/apache/groovy/pull/1660#discussion_r762619277
##########
File path: src/main/java/groovy/lang/NamedValue.java
##########
@@ -0,0 +1,24 @@
+package groovy.lang;
+
+public class NamedValue<T> {
Review comment:
Using Map.Entry would a) require a user who wants to e.g. return the
result of NVL call from a method to write
```List<Map.Entry<String,Object>>``` instead of just ```List<NamedValue>```,
and b) also the returned object is, in fact, not a map-entry, and the String
value it carries is not a "key" to a map :-)
So it would seem extremely forced, inconvenient & confusing for the user to
go with Map.Entry<String,Object> here, just to avoid a small, clearly named
class. I do also not understand where this small, completely orthogonal
functionality would tie into any discussion (which I am evidently unaware of /
not privy to) about the large public API of Groovy... ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]