Limiting yourself to “only Unreal” or “only Unity”, etc, won’t really teach you programming;
It’s really important to experiment with the general picture, instead of stay enclosed inside game making environment. The thing is games isn’t the best place to start learning programming, one willing to be programmer should go learn it somewhere else first and later begin applying his acquired knowledge into game developing… starting right into game dev most likely ends up as a pile of unfinished game projects.