# Real world example of contraction and weakening

Can you provide me a real world example of contraction and weakening in the type system of a popular language like Java, Kotlin, etc.? I heard that Rust has got explicit contraction but I don´t understand how this influences how we use such a language.

• Your question is pretty vague, but contraction is effectively used almost anytime you use a variable more than once, and weakening when you use it zero times. If I write $f(x,y)=x+x$, contraction is what allows me to use $x$ twice and weakening allows me to use $y$ zero times. – Derek Elkins Aug 1 at 3:35