When comparing Elm vs Unreal Engine 4, the Slant community recommends Elm for most people. In the question“What are the best game engines for web games?” Elm is ranked 1st while Unreal Engine 4 is ranked 7th. The most important reason people chose Elm is:
Lack of run-time exceptions makes it easy to produce large swathes of reliable front-end code without drowning in tests.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro No run-time exceptions
Lack of run-time exceptions makes it easy to produce large swathes of reliable front-end code without drowning in tests.
Pro Inferred static typing
ML static typing is great because it's always there, you just choose how explicit you want to be and how much you want the compiler to do.
Pro Super easy refactoring with very helpful compiler errors
In no other language you can refactor so easy without any worries, since the compiler will guide you through. It is like TDD but than compiler-error driven.
Pro Designed around high-level front-end development
As Elm was designed as a front-end langauge, it has out of the box support for things like DOM-element creation, letting programmers focus on their application logic, rather than implementation details specific to the web.
Pro Great and simple way to learn Purely Functional Programming
You can try to apply some functional programming ideas in other languages that have an imperative basis, but you haven't seen the real power unless you tried it in the environment of purely functional programming. Elm is a simple language with great learning resources and easy graphical output, which makes it easy to explore the power of functional programming. Plus programming in Elm is very readable.
Pro Good tooling
All major editors have great support. With Atom for example, Elm plugins are available for linting, formatting, make/compiler support and Elmjutsu will simply overflow you with super useful functions, like navigate to referenced definition and show expression type.
Pro Batteries included
The Elm Architecture means you don't need to spend valuable time and effort choosing the right frameworks, state management libraries, or build tooling. It's all built in.
Pro Static module system
Elm uses easy to use modules.
Use:
import List
import List as L
import List exposing (..)
import List exposing ( map, foldl )
import Maybe exposing ( Maybe )
import Maybe exposing ( Maybe(..) )
import Maybe exposing ( Maybe(Just) )
Creation:
module MyModule exposing (foo, bar)
Pro Missing syntactic sugar
Easy to learn, most functions have only one way, not 5 alternatives where you must study where to best use what.
Pro Growing community
Pro Interactive Programming and Hot Swapping
Support for hot swapping and interactive programming is included.
Pro Easy to code review
The lack of side-effects and simple, consistent language semantics make it easy to quickly review incoming changes.
Pro Higher confidence in code correctness and quality
Pure functions, immutable data structures, amazing compiler, clean and homologous syntax used for HTML, logic, and optionally to replace CSS, elimination of entire classes of bugs so you don't even need most unit tests. These factors lead to better code, better programs, higher confidence, and ultimately, more satisfaction.
Pro Not quite Haskell semantics
Luckily you do not have to learn Haskell to be able to do any Elm. It is meant to be a language that compiles to Javascript, so for Javascript programmers (Front end) not for CS students who want to learn as many different algorithms as possible.
Pro A visual scripting system for non-coders enables quick prototyping
Blueprints are authoring tools designed for non programmers so designers and other team members can help tweak and prototype. UE4's Blueprint scripts resemble flowcharts where each box represents a function or value, with connections between them representing program flow. This provides a better at-a-glance indication of game logic than a simple list of events, and makes complex behaviors easier to accomplish and games a lot faster to prototype.
Pro Lots of resources to learn from
Epic provides multiple official video tutorials, lots of free example projects and content, an extensive wiki and regular streams showing how to use latest features.
Pro Powerful material/shader system
Allows a texture/material artist or VFX artist to create amazing effects from the ground up.
Pro Free development license, including source code
The engine, including full access to source code, is free to use; a 5% royalty is due only when you monetize your game or other interactive off-the-shelf product and your gross revenues from that product exceed $1,000,000 USD.
Pro Realistic graphics
Pro Developers have full control of the engine and source code
UE4 gives full access to the C++ source code allowing editing and upgrading anything in the system.
Pro Dynamic global illumination with voxel cone tracing decreases the computational power needed
Voxel cone tracing is a similar algorithm to ray tracing, but uses thick rays instead of pixel thin rays to be able vastly decrease the amount of computational power needed.
Pro Easy to use animation blueprints
Unreal Engine 4 is one of the best game engines. It is super easy. It dosent require any use of coding due to Animation Blueprints
Pro Spectacular lighting visuals
Pro Cross-platform editor and export
This engine exports for a big range of platforms including Linux. The editor can be run on Windows, MacOS, and Linux (Early Access).
Pro Active community
Forums have many active and friendly members that are quick to respond and help out. Even staff is very active on forums.
Pro AAA Ready
This is ready to make the next AAA game.
Pro Fast compilation for quick iteration
Recompiling an entire game to test a small change takes up a lot of time. UE4 quickly compiles in seconds instead of minutes improving iteration time by an order of magnitude.
Pro Quick release-cycle
New feature releases can be commonly expected about once a month.
Pro Professional feature set for all aspects of game development
Almost everything a game developer wants has a deep and sophisticated tool waiting for them in UE4. No external plugins are needed to make powerful materials, FX, terrain, cinematics, gameplay logic, AI, animation graphs, post process effects, lighting etc.
Pro Proven track record
Pro No coding experience needed
Cons
Con Lack of typeclasses
Elm doesn't have typeclasses which means some code needs to be duplicated. A fix in a function that needs typeclasses means all of the duplicates need to be fixed too.
Con limited js interop
only one way ports are available as a crude js FFI. This means you can only call functions both directions but will not get a result.
Con Harder to get buy-in from devs and mgmt
It's a total divergence from what most people are used to in the JS ecosystem. The change in syntax can be scary, the change in approaching problems can be scary. The fact that it's not backed by FANG can be scary. The fact that it's not v1.0 can be scary. The governance model and the deliberately slow release cadence can be scary. There are a couple harsh medium articles, hackernews/reddit posts out there made by people with an ax to grind that can be scary if you don't have a better picture of the Elm community, the tradeoffs that have been made, or the benefits to be had over other options. None of these are good reasons to write off further investigation of a great tech, but it happens.
Con Code Repetition
Because of the lack of genericness Elm needs a lot of code to be repeated. There are 130+ implementations of map in elms core libraries.
Con Features get removed without warning
Often features that are deemed to be misused by the community like infix operators get removed without much of a warning.
Con Community harsh if criticised
If one even dares to start a discussion about a feature on elms slack, discord, subreddit or github one will be aggressively shut down often argueing that one should use purescript instead
Con Poor Windows support
Few if any of Elm's core contributors are Windows users and breaking bugs are sometimes left for weeks or months.
Con Good for beginners not good for experts
Development in elm is quite nice until you need some more advanced features. These however are actively discontinued and removed because elm wants to establish a "single way of doing things" philosophy
Con Updates break existing code often
The last few updates of elm broke existing code in major ways.
Con Adds an additional layer of abstraction
Some users claim that Elm adds an additional layer of abstraction, meaning that it is one more hurdle between the brain and the product.
Con Functional programming itself has quite a steep learning curve
Functional programming can be quite difficult to get your head around. It takes time to unlearn object orientational habits.
Con No Genericness in the future
Currently there is no code genericness like typeclasses possible, it has been officially stated that this will never change.
Con Not database-friendly
It is lots of work to make a server or database your "one source of truth", as Elm makes you write endless JSON parse boilerplate to talk to the server.
Con No Syntactic Sugar
Often you need to write longer and less readable code because there are no alternatives that are more concise.
Con Very high build size
A blank project will build in to a minimum of 200 MB.
Con Slow
Compared to other engines, UE4 seems to perform various actions considerably slower. Actions like starting the engine, opening the editor, opening a project, rebuilding shaders, updating references, calculating lightmaps, saving projects, etc take long enough to get irritating and end up wasting precious development time.
Con Extremely long build times
Making a full rebuild, including engine can take a good 30minutes. If you plan to use Unreal professionally, you better get some licenses for Incredibuild as well.
Con Hard engine for beginners
This engine not easy for beginners
Con Steep learning curve
Especially when compared to its primary competitor, Unity.
Con No drawcall batching, performance is very bad on mobile
There's no dynamic batching support to minimize drawcalls. There's InstancedStaticmesh concept in UE4, but it's 3d only, functionally limited and requires hardware support which rules out most mobile devices.
Con C++ - oriented development cycle: slow turn-around times
The Unreal Editor is the main place to do stuff (of course), so if someone wants to do a lot of C++ stuff, the compilation and linking turn-around times can be painful. Still they probably are quite fast in comparison to the provided featureset.. Still ,they are far from optimal.
Con Poor documentation
Most of the "documentation" for code is actually just automatically generated from the source. If you're interested in knowing how things are supposed to work, you must either go to their answers site or pay for UDN.
Often their examples won't even compile, since they were written for now outdated versions.
Con Royalty based
5% of profits will go to Unreal after $3000 earned in a quarter.
Con They spend more time adding features than fixing existing ones
Con C# not natively supported
UE4 does not support C# natively, but this can be achieved through MonoUE, although it requires using the MonoUE fork instead of UE itself.
Con Poor source control support
Merge tool is not working.
Con Poor quality assurance on their releases
After each release they almost immediately release a hotfix. And another one. And another one.
Con Unreal Engine crashes a lot if you don't have the required system requirements
Con Sparse Resources for C++
C++ happens to be the main suite for Unreal, yet the documentation is very, very sparse.
Con Extremely poorly designed
The code is a mess.
Everything is connected, a single Actor is 1500 bytes, because it contains a million things that Epic once needed in a game.
Inheritance for AActor: AActor > UObject > UObjectBaseUtility > UObjectBase
Con Difficult for Mac users
If you're installing it on Mac, you simply download Epic games launcher and watch it download nothing endlessly.
Con Tutorials do not go in-depth enough
The blueprint tutorial just teaches how to turn on a light when you press f.
Con Proprietary
Con Not available on Linux
Con No Terrain Editor included
Con Bad support
The epic games team only assists with billing and account issues, not bugs.
Con Terrible physics
Con Frequent crashes
Often the editor crashes interrupting your work.