JavaScript vs. Swift



Hacker News, Reddit, Stack Overflow Stats

  • 1.43K
  • 4.83K
  • 1.75M
  • -
  • 7.48K
  • 219K

GitHub Stats

No public GitHub repository stats available

Description

What is JavaScript?

JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.

What is Swift?

Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Want advice about which of these to choose?Ask the StackShare community!

Pros

Why do developers choose JavaScript?
Why do you like JavaScript?

Why do developers choose Swift?
Why do you like Swift?

Cons

What are the cons of using JavaScript?
Downsides of JavaScript?

What are the cons of using Swift?
Downsides of Swift?

Companies

What companies use JavaScript?
5928 companies on StackShare use JavaScript
What companies use Swift?
1092 companies on StackShare use Swift

Integrations

What tools integrate with JavaScript?
78 tools on StackShare integrate with JavaScript
What tools integrate with Swift?
13 tools on StackShare integrate with Swift

What are some alternatives to JavaScript and Swift?

  • PHP - A popular general-purpose scripting language that is especially suited to web development
  • HTML5 - 5th major revision of the core language of the World Wide Web
  • Python - Python is a clear and powerful object-oriented programming language, comparable to Perl, Ruby, Scheme, or Java.
  • Java - A concurrent, class-based, object-oriented, language specifically designed to have as few implementation dependencies as possible

See all alternatives to JavaScript

Latest News

Improved CSS, Extract Vue Component, and More on Jav...
Intro to Javascript debugging with source maps
Stimulus: A modest JavaScript framework for the HTML...
Swift Playgrounds 2.0 Now Available
Swift Playgrounds 2.0 Now Available
How to send Push Notifications to your iOS app with ...
Related Stack Decisions
Eli Hooten
Eli Hooten
CTO at Codecov · | 9 upvotes · 30528 views
atCodecov
Visual Studio Code
Vue.js
CoffeeScript
JavaScript
TypeScript

We chose TypeScript at Codecov when undergoing a recent rewrite of a legacy front end. Our previous front end was a mishmash of vanilla JavaScript and CoffeeScript , and was expanded upon haphazardly as the need arose. Without a unifying set of paradigms and patterns, the CoffeeScript and JavaScript setup was proving hard to maintain and expand upon by an engineering team. During a move to Vue.js , we decided to also make the move to TypeScript. Integrating TypeScript and Vue.js is fairly well understood at this point, so the setup wasn't all that difficult, and we felt that the benefits of incorporating TypeScript would outweigh the required time to set it up and get our engineering team up to speed.

Choosing to add TypeScript has given us one more layer to rely on to help enforce code quality, good standards, and best practices within our engineering organization. One of the biggest benefits for us as an engineering team has been how well our IDEs and editors (e.g., Visual Studio Code ) integrate with and understand TypeScript . This allows developers to catch many more errors at development time instead of relying on run time. The end result is safer (from a type perspective) code and a more efficient coding experience that helps to catch and remove errors with less developer effort.

See more
Russel Werner
Russel Werner
Lead Engineer at StackShare · | 8 upvotes · 1418 views
atStackShare
Emotion
JavaScript
Glamorous
React
HAML
Sass
#Inlinecss

When we rebooted our front-end stack earlier this year, we wanted to have a consolidated and friendly developer experience. Up to that point we were using Sass and BEM. There was a mix of HAML views, React components and Angular. Since our ongoing development was going to be exclusively in React, we wanted to shift to an inline styling library so the "wall of classnames" could be eliminated. The ever-shifting landscape of inline CSS libraries for React is sometimes difficult to navigate.

We decided to go with Glamorous for a few reasons:

1) Previous team experience with this library 2) We can write our styles in plain JavaScript (which brings many benefits) 3) It supports server-side rendering 4) It has great composition patterns

As you may or may not know, Glamorous has ceased active development and been mostly superseded by Emotion. We are planning to migrate to either Emotion or @styled-components in the near future, and I'll write another Stack Decision when we get there!

#inlinecss

See more
Jake Stein
Jake Stein
CEO at Stitch · | 16 upvotes · 5446 views
atStitch
ES6
JavaScript
CoffeeScript
React
AngularJS

Stitch’s frontend is used to configure data sources and destinations and monitor the status of each. Although we have been using AngularJS since its early days, we recently introduced React components into our front end, which many of our developers find easier to work with. We started using CoffeeScript when it was one of the few options for a more expressive alternative to vanilla JavaScript, but today we opt to instead write new code in ES6, which we feel is a more mature alternative.

See more


Interest Over Time