When comparing Discourse vs StackExchange, the Slant community recommends Discourse for most people. In the question“What are the best question and answer platforms?” Discourse is ranked 1st while StackExchange is ranked 3rd. The most important reason people chose Discourse is:
Discourse has a simple user trust system that makes moderating the forum a lot easier. Users gain more permissions as they gain more trust, which limits the amount of damage spammers and trolls can do. Discourse co-founder Jeff Atwood also founded StackExchange, which is the gold standard for gamification/moderation systems so you can also expect Discourse to get better and better at moderation.
Specs
Ranked in these QuestionsQuestion Ranking
Pros

Pro Has a built-in immune system from trolls, spammers and bad actors
Discourse has a simple user trust system that makes moderating the forum a lot easier. Users gain more permissions as they gain more trust, which limits the amount of damage spammers and trolls can do. Discourse co-founder Jeff Atwood also founded StackExchange, which is the gold standard for gamification/moderation systems so you can also expect Discourse to get better and better at moderation.

Pro 100% free and fully open source
Discourse is powered by Ruby on Rails, Ember.js, PostgreSQL and Redis. The code is licensed under GPL and available on GitHub.
Pro Modern & polished UI/UX with lots of great smaller features
The best feature is its design: discourse is designed to aid in the creation of high quality online conversations. Flat discussions with well implemented quoting systems, expandable/collapsible replies, infinite scroll, clean UI and many more features come together to form a highly polished forum experience that makes legacy forums show their age.
Pro Helpful community
Discourse has a comprehensive forum culture support hub at meta.discourse.org.
Pro Hosted and self-hosted solutions
You can host it yourself in a $5 cloud server or on any Linux server you already have. And if you don't want to deal with this, you can use the hosting platform from the development team.

Pro Live preview while editing the post
The post editor has a synchronized side-by-side preview of the Markdown rendering of the post.
Pro User selectable themes
Users can choose between the themes made avaliable on their instances, and even use different themes on different devices (mobile vs desktop, for example).

Pro Export your posts

Pro Effective search
Pro Good to go out of the box yet infinitely tweakable
Discourse has sane, safe out of the box defaults, but a million dials and knobs to tweak.

Pro Easy one-click upgrade
Discourse can upgrade itself with one click in the admin panel. Not the same can be said about MyBB, or most other forums.
Pro Advanced JavaScript app
Runs in modern browsers and works identically on desktop and tablet and smartphone without the need for a native app.

Pro Discussions can be organized in categories and tagged
Discussions can be tagged with an arbitrary number of tags, separately from categories. Categories are hierarchical and don't scale; tags do.

Pro Official Akismet Anti-Spam Plugin
Official Akismet plugin vets posts by new users to make sure they don’t look spammy before they hit your site. Akismet key purchase required.

Pro Extensible via plugins
Pro Good on-boarding experience for new users
New users are greeted withe the disco bot which has an interactive experience to teach the basics of using Discourse.
Pro Popularity / maturity
The Stack Exchange sites have a large user base.
Due to this being broken down to sub-sites per topic however some of their sites have more users than others, so depending on the subject matter of the question this pro may not apply.
Pro Subject Matter: Various (site specific)
Whilst sites under the Stack Exchange banner are focussed on specific topics, there are a wide variety of such sites.
As such Stack Exchange could be described as being open to questions on any subject matter, but has the advantage that within its sub-sites, questions are targeted to the specific users/audiences of those sites.
Pro Expert-level questions & answers
Many topics have active members who are among the top professionals in their fields. MathOverflow, for example, has Fields Medal winners.
Pro User ratings by topic
Users are scored based on their contributions, with the context of those contributions also being scored (i.e. answering a question tagged as being about XML increases that user's XML score). This results in allowing the questioner to gauge a rough idea of the answerer's relative knowledge within a domain when considering their answers vs contradictory answers from other users.
Cons

Con Complicated setup
Compared to standard PHP+MySQL apps, Discourse is more complicated - the app lives in a Docker container. However, a Docker image is available, which reduces the setup time to about 30 minutes.
Con Leaves out users with shared hosting
Discourse requires sudo, which is only available on a VPS.
Con Bad noscript support
When using a Discourse forum without scripts the experience is greatly reduced. It's really hard to use and is read-only, meaning that one can't comment or create threads without scripts.
Con It is more "Free to Try" than really free
Discourse is open source free software. The hosting is where the costs come in. Discourse.org hosting starts at $100/mo, but you can pay as little as $5/mo on Digital Ocean or other cloud hosts.
Con Extremely expensive hosting
Official discourse.org hosting starts at $100/mo and supports the team creating the software. It can also be hosted on a cloud service like Digital Ocean for $5/mo.
Con Objective; Not Subjective
The Stack Exchange sites are specifically designed to work for objective questions; questions with subjective answers are explicitly discouraged.
See their blog for more information.
Con Limited in scope
There is a large number of different "stackexchanges", but they are all completely closed off from one another.
Con Intolerant and immature culture of the community
The people on the platform aren't very outgoing or accepting of others.
Con Popularity contest feeling
The reward system feels like you're in a popularity contest. While this encourages good answers, it feels like everything is built around the reward system. So much that, you need to have certain points to unlock features on the site.
