Nicolai Parlog 6/25/2018

Unlocking Traits With var

Read Original

This technical article examines how Java's local-variable type inference ('var') can be used to emulate traits and intersection types. It discusses the conceptual idea of traits, compares them to intersection types, and demonstrates implementation tricks using lambdas and default methods, while noting the practical trade-offs involved.

Unlocking Traits With var

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week