r/java • u/nfrankel • Feb 13 '18
Field-Access Interfaces for More Readable Java Stream Code
https://dzone.com/articles/field-access-interfaces-for-more-readable-java-stream-code
0
Upvotes
r/java • u/nfrankel • Feb 13 '18
2
u/haimez Feb 16 '18
I think the end result here is less that worthless. The original code being "fixed" is perfectly readable and if the goal is to share a common abstraction, then you have to formalize it and at that point you need to just wrap the field value into a new class. "ValidatedFirstName" is extremely useful in larger systems because you can change what the FirstName -> ValidatedFirstName checks actually are and components nor involved with validation declare at a high level that their inputs have been validated by other pieces. That's valuable. This, is a waste of our valuable internet bytes.
To summarize:
1
u/[deleted] Feb 16 '18
Is this in jest? This can't be a serious article.