The new Boeing 777X has longer wings to improve efficiency, but has to adopt foldable wingtips to "fit" into all original airports that host its predecessor.
Tendentially, longer wings would have an higher weight and foldable mechanism surely add extra weight too, but thanks to new materials, new wings should be almost as heavy as previous ones.
For me, in absence of further information and comparisons, it's not so easy to understand why this solution is surely better of simply have lighter wings with original length, that would allow benefits too.