In operation it does not matter, but for debugging or repair it does, but these are not normal operation considerations.
Probably something like this might work, while this prototype works at home 24h a day/7days a week as a small air fan speed controller
Triac i sswitched in zerro-crossing by mentioned MOC304x based microcontrolled AVR DIP8 ATTiny85 MCU powered by rectified 1000V KBPC full bridge step down to 12V by 1W Zener diode from 230VAC mains with 470nF MKT cap and about 440 Ohm in series with 2x 100k resistors (to prevent sparks) on this high voltage cap to discharge-I do not like when I put 230VAC plug into the wall and there are sparks or touching 230VAC after removeing from wall socket,
Of course someone can say there is no sense put optoisolator on AVR pins while MCU is powered from mains... well its easy switch on/off 230VAC triac using this MOC304x ICs (wih snubber network while I have
BTA16 triac
http://www.onsemi.com/pub_link/Collateral/BTA16-600CW3-D.PDF -not snubberless version but
WITH INSULATED RADIATOR TAP -it does not mean I touch it -i use multimeter temperature sensor regrdless it is insulated or not!!! (
BT138 has MAINs on TAP as I remember
http://www.nxp.com/documents/data_sheet/BT138-600E.pdf yep mains terminal 1, so I do not recommend it for new mains players who wants very often touch it to see if it get hot !!!) and if I wanted galvanic insulated MCU and only one part touchable here this potentiometer, than.. I can remove top-left big red cap and those few bigger resistors and KBPC bridge and in this place simply solder inputs from external 230VAC -> 9V-12V wall adapter and I have fully optoisolated down half PCB from 230VAC mains, but power consumption of DC MCU control circuit is less than 20mA and its internals not easy to touch, so In this DIY version there is no external galvanic insulation of MCU circuit, but can be done easy if needed
Of course there is 230VAC 2A fuse hidden by triac radiator disconnecting AC mains brown load
BTW: If someone made ever teardown of hairdryer and saw those 230VAC wires with DC motor powered by diodes and voltage taken from resistive red hot springs cooled only by its fan and imagine how close it is to human wet hair.... it is better do not know what is inside those things and how it works