Need advice about which tool to choose?Ask the StackShare community!
Erlang vs JavaScript vs Swift: What are the differences?
Concurrency Model: Erlang is built for concurrency with its lightweight processes that communicate through message passing. JavaScript, on the other hand, is primarily single-threaded but can achieve concurrency through Web Workers and Asynchronous programming. Swift supports concurrency through async/await and Grand Central Dispatch.
Typing System: Erlang is dynamically typed, meaning the data type of a variable is determined during runtime, whereas both JavaScript and Swift are statically typed, requiring variable data types to be declared at compile time.
Syntax: Erlang has a Prolog-like syntax that is functional and simple, with a focus on pattern matching. JavaScript is C-like with curly braces and semicolons, supporting both functional and object-oriented programming paradigms. Swift has a syntax similar to Objective-C with some improvements, making it more expressive and readable.
Concurrency Handling: Erlang handles concurrency by isolating processes and ensuring fault tolerance through supervision trees. JavaScript utilizes callbacks, promises, and async/await for handling asynchronous operations. Swift uses Grand Central Dispatch and async/await for managing concurrent tasks efficiently.
Tooling and Ecosystem: Erlang has a strong toolset for building distributed systems but may lack in libraries for general-purpose tasks. JavaScript has a vast ecosystem with libraries and frameworks like Node.js and React for web development. Swift benefits from Apple's tooling and ecosystem, making it ideal for developing iOS and macOS applications.
Platform Support: Erlang is designed for building highly scalable and fault-tolerant systems on the server-side. JavaScript is primarily used for client-side web development, but with Node.js, it can also be used for server-side development. Swift is mainly used for Apple platforms like iOS, macOS, watchOS, and tvOS development.
In Summary, Erlang excels in concurrency and fault tolerance, JavaScript is versatile for web development, and Swift is optimized for Apple platforms.
Pros of Erlang
- Concurrency Support60
- Real time, distributed applications60
- Fault tolerance56
- Soft real-time35
- Open source31
- Functional programming21
- Message passing20
- Immutable data15
- Works as expected13
- Facebook chat uses it at backend5
- Practical4
- Knowledgeable community4
- Bullets included3
Pros of JavaScript
- Can be used on frontend/backend1.7K
- It's everywhere1.5K
- Lots of great frameworks1.2K
- Fast896
- Light weight745
- Flexible425
- You can't get a device today that doesn't run js392
- Non-blocking i/o286
- Ubiquitousness236
- Expressive191
- Extended functionality to web pages55
- Relatively easy language49
- Executed on the client side46
- Relatively fast to the end user30
- Pure Javascript25
- Functional programming21
- Async15
- Full-stack13
- Setup is easy12
- Its everywhere12
- JavaScript is the New PHP11
- Because I love functions11
- Like it or not, JS is part of the web standard10
- Can be used in backend, frontend and DB9
- Expansive community9
- Future Language of The Web9
- Easy9
- No need to use PHP8
- For the good parts8
- Can be used both as frontend and backend as well8
- Everyone use it8
- Most Popular Language in the World8
- Easy to hire developers8
- Love-hate relationship7
- Powerful7
- Photoshop has 3 JS runtimes built in7
- Evolution of C7
- Popularized Class-Less Architecture & Lambdas7
- Agile, packages simple to use7
- Supports lambdas and closures7
- 1.6K Can be used on frontend/backend6
- It's fun6
- Hard not to use6
- Nice6
- Client side JS uses the visitors CPU to save Server Res6
- Versitile6
- It let's me use Babel & Typescript6
- Easy to make something6
- Its fun and fast6
- Can be used on frontend/backend/Mobile/create PRO Ui6
- Function expressions are useful for callbacks5
- What to add5
- Client processing5
- Everywhere5
- Scope manipulation5
- Stockholm Syndrome5
- Promise relationship5
- Clojurescript5
- Because it is so simple and lightweight4
- Only Programming language on browser4
- Hard to learn1
- Test1
- Test21
- Easy to understand1
- Not the best1
- Easy to learn1
- Subskill #41
- Hard 彤0
Pros of Swift
- Ios259
- Elegant180
- Not Objective-C126
- Backed by apple107
- Type inference93
- Generics61
- Playgrounds54
- Semicolon free49
- OSX38
- Tuples offer compound variables36
- Clean Syntax24
- Easy to learn24
- Open Source22
- Beautiful Code21
- Functional20
- Dynamic12
- Linux12
- Protocol-oriented programming11
- Promotes safe, readable code10
- No S-l-o-w JVM9
- Explicit optionals8
- Storyboard designer7
- Optionals6
- Type safety6
- Super addicting language, great people, open, elegant5
- Best UI concept5
- Its friendly4
- Highly Readable codes4
- Fail-safe4
- Powerful4
- Faster and looks better4
- Swift is faster than Objective-C4
- Feels like a better C++4
- Easy to learn and work3
- Much more fun3
- Protocol extensions3
- Native3
- Its fun and damn fast3
- Strong Type safety3
- Easy to Maintain3
- Protocol as type2
- All Cons C# and Java Swift Already has2
- Esay2
- MacOS2
- Type Safe2
- Protocol oriented programming2
- Can interface with C easily1
- Actually don't have to own a mac1
- Free from Memory Leak1
- Swift is easier to understand for non-iOS developers.1
- Numbers with underbar1
- Optional chain1
- Great for Multi-Threaded Programming1
- Runs Python 8 times faster1
- Objec1
Sign up to add or upvote prosMake informed product decisions
Cons of Erlang
Cons of JavaScript
- A constant moving target, too much churn22
- Horribly inconsistent20
- Javascript is the New PHP15
- No ability to monitor memory utilitization9
- Shows Zero output in case of ANY error8
- Thinks strange results are better than errors7
- Can be ugly6
- No GitHub3
- Slow2
Cons of Swift
- Must own a mac5
- Memory leaks are not uncommon2
- Very irritatingly picky about things that’s1
- Complicated process for exporting modules1
- Its classes compile to roughly 300 lines of assembly1
- Is a lot more effort than lua to make simple functions1
- Overly complex options makes it easy to create bad code0