In a large saucepan, mix sugar, cornstarch and salt. Whisk in milk until smooth. Cook and stir over medium heat until thickened and bubbly. Reduce heat to low; cook and stir 2 minutes longer. Remove from heat.
In a small bowl, whisk a small amount of the hot mixture into egg yolks; return all to the pan, whisking constantly.
Bring to a gentle boil; cook and stir for 2 minutes. Then, reduce heat to low and stir in the dark chocolate until melted. Remove from heat and stir in the vanilla extract.
Cool for 15 minutes while stirring occasionally.
Finally, transfer it to a bowl and press plastic wrap onto the surface of the pudding. Do refrigerate it until it's cold. If you desire, you can serve it with whipped cream.