AFAIK homebrew-cask doesn't compile anything, it just downloads the dmg and copies the app for you so that you don't have to mount the dmg and drag the app bundle to your applications folder yourself.
They'll probably update their repository as soon as the GIMP devs release a 2.10 dmg (at which point you might as well download it yourself).