While "cognitive enhancers" and nootropics can increase performance (caffeine is my stimulant of choice) I don't think any can really act as a substitute for proper sleep. Sleep is incredibly important to learning & memory - stimulants can only really temporarily mask the effects of sleep deprivation but they rapidly lose effectiveness if one isn't maintaining proper sleep hygiene.
The title of the article is "Modafinil for cognitive neuroenhancement in healthy non-sleep-deprived subjects" (emphasis mine). I don't think the article, nor anybody here in the comments, suggested that Modafinil is a good substitute for sleep.
Totally agree. And not just from a performance perspective, the positive affect on mood in general is very important. Melatonin has helped me greatly in the last year.