Use slicing syntax instead of methods and add a feature gate

cc @aturon 

r? anyone?
For some reason I couldn't add attributes to this code snippet - I tried to allow slicing syntax but there was no way I could get it to work.