Some comparisons:
Hardfork is making some invalid transactions valid
Softfork is making some valid transactions invalid
Hardfork requires the consensus of vast majority of miners, users, and merchants
Softfork requires the consensus of vast majority of miners, but not necessarily non-mining users and merchants
Hardfork can change any rules in the protocol or implement any new rules
Softfork is usually less powerful (with a trick which I call "Aux block", a softfork could also be very powerful:
https://bitcointalk.org/index.php?topic=283746.0)
Thank you for the comparison! This was very helpful.
Are a hard fork and soft fork implemented in different ways? Like are you editing the same code in both fork types?