Majority Gate with when-else statement
The following version of the majority gate uses a 'when-else' statement:
-- the architecture now uses a when-else statement.
ARCHITECTURE whenelse of majority is
Y <= '1' when ( (A and B) or (A and C) or (B and C))
You will find that there are many different ways to accomplish the same result in VHDL. There is usually no best way; just use one that you feel most comfortable with.