http://press-start.com.au/news/nintendo/2017/03/02/nintendo-switch-uses-friend-codes-add-friends/
It is now confirmed Nintendo Switch uses Friend codes as a way to add friends. There are other options like search for local users and add players you played with online. A major backward step from the Wii U, where friend code were abolished and now reintroduced.