experimenting with some pattern implementations using cpp