Need advice about which tool to choose?Ask the StackShare community!

C++

17.5K
9.1K
+ 1
844
Swift

21.1K
13.1K
+ 1
1.3K
Add tool

C++ vs Swift: What are the differences?

Key Differences between C++ and Swift

1. Type System:

C++ has a static typing system, which means variables need to be declared with a specific type and the compiler checks type compatibility during compilation. Swift, on the other hand, has a strong static typing system with type inference, allowing developers to omit type declarations in many cases.

2. Memory Management:

C++ requires manual memory management, where the programmer needs to explicitly allocate and deallocate memory using new and delete keywords. In contrast, Swift uses automatic memory management with Automatic Reference Counting (ARC) to track and manage memory allocation and deallocation, reducing the chances of memory leaks.

3. Optionals and Null Safety:

Swift has a built-in feature called optionals, which allows variables to be either a value or nil. This ensures null safety and helps to avoid null pointer errors. C++ does not have a native support for optionals, and developers often need to use pointers or sentinel values to handle nullability.

4. Syntax and Expressiveness:

C++ follows a more verbose and complex syntax compared to Swift. Swift has a more expressive and concise syntax with features like closures, generics, and pattern matching, which allow developers to write code in a more readable and maintainable way.

5. Concurrency:

C++ provides various concurrency models like threads, thread pools, and libraries for parallel processing. Swift, on the other hand, has built-in language-level support for concurrency with features like async/await, actors, and structured concurrency, making it easier to write scalable and efficient concurrent code.

6. Compatibility and Platform Support:

C++ is a cross-platform language that can be compiled and run on different operating systems, making it highly compatible. Swift, although open-source, was primarily designed for iOS, macOS, watchOS, and tvOS platforms, and its compatibility with other platforms is still evolving.

In summary, C++ is a statically typed language with manual memory management, while Swift has a strong static typing system with automatic memory management. Swift provides features like optionals, expressive syntax, and built-in support for concurrency, which sets it apart from C++.

Advice on C++ and Swift
Needs advice
on
AngularJSAngularJSC++C++
and
JavaJava

I will use Elixir for personal projects. It's productive, reliable, secure, simple, etc. But when performance is critical, I need job opportunities, when I work with mutability, which do I pick? I need advice on which "bureaucratic, mainstream" programming language to pick when wanting performance and jobs. Elixir is often "slow", and it hasn't boomed yet the way Golang and Rust have, so which?

See more
Replies (1)
FREDRICK OLUOCH
Lead Software Developer at Blaqueyard · | 3 upvotes · 54.5K views
Recommends
on
ElixirElixirRustRust
at

Well for those performant tasks maybe you can use Rust nifs for elixir. Elixir enables to write fault-tolerant, scalable code for concurrent systems, and as such, it is perfect for messaging systems and web applications that might need to handle a lot of users efficiently. But if you need speed you can plug in Rust or write a microservice using Goland/Rust.

See more
Needs advice
on
FlutterFlutterPythonPython
and
SwiftSwift

Hello, I am still a student and would like to ask a question. Currently, I am developing in mobile development with Flutter in the frontend and Python in the backend part. Right now I have to make a choice about developing a mobile app or developing a backend to progress more professionally. My questions are as follows:

1) If I prefer the mobile application area, will I only work with the Ui/Ux developer with the front-end and code the designs in Swift Kotlin languages, am I responsible for the back-end software?

2) I have a product that generates new ideas so I like to control the development and work there because the backend is the brain, but are they independent from each other in the backend mobile application? Is the mobile app developer responsible for the backend software?

3) I don't like graphic design because I don't like it if it's not perfect and I get stressed. Am I responsible for the graphic design in the mobile app?

4) Is a mobile app developer also a backend developer?

I know these are very simple questions, but they are very important to me. Thanks for your answers.

See more
Replies (3)
Benjamín Cáceres
Software Developer at Empirica Consultores · | 5 upvotes · 108K views
Recommends

Hi Hüseyin! 1-2) In my experience If you are a Mobile Applications Developer you will have the following responsabilities: - Develop (not designing) both functionality and screens of the app you are working - Consume (not develop) third party or self company owned APIs or Backend services - Distribution tasks. - Mantainance tasks. Now, there will always be companies wishing you know the whole thing (ui/ux, backend, frontend, mobile, cd/ci, data science, etc.). And of course it will be helpful for you to know a little bit of the stuff around mobile development, but it's not very common since it's not part of the responsabilities of a mobile app dev.

3) No, you are not responsable for the designs of your application, that's why companies have Product designers, ux designers, ui designers for preparing the screens, logos, color palettes, etc for products. As a developer your job is to see and examine the designs and take them from Figma, InVision, Zeplin, etc to the Code editor.

4) This is the thing, if you are working as a Mobile Developer you might know about Mobile development, not backend, not frontend, not ui ux. BUT if you know a little about backend that might be helpful although backend should not be your responsability.

I hope this makes sense to you. Cheers!

See more
Jake Hawken
Senior iOS Developer at Grailed · | 4 upvotes · 104K views
Recommends
on
SwiftSwiftXcodeXcode

As a mobile developer, I'm usually a member of a larger team and it's usually another person's responsibility to develop the backend/API, and another person's to do the UX/design. Very very few teams use cross-platform tools like Flutter or React Native, because tools like those tend to make mediocre apps that scale poorly and are impossible to debug, so make sure to get familiar with Swift/iOS or Kotlin/Android (or both).

See more
Preeti Yuankrathok
Software Consultant at CODIUM · | 2 upvotes · 79.4K views
Recommends

Hi! I think most of your questions led to these answers:

  • Mobile software developers don't responsible for the back-end part, or even graphic design. Of course, the back-end part should be done by a back-end developer. The graphic design, I'd say that if you work on a start-up, you might be the one who does since there isn't much manpower there, but in the larger company, they would have a designer especially in UI/UX. You'll have a mockup for the application that you need to follow. As a developer, you're expected to code, not design.

  • I've said that the responsibility isn't yours, but of course, you'll have an advantage over others if you know UI/UX, or back-end as well. That would help you a lot to be a good mobile developer.

Good luck!

See more
Adit Patel
Needs advice
on
RustRust
and
SwiftSwift

Hey there, we are looking to develop our own layer 1 blockchain. We're splitting the responsibilities for origination, clearing, and settlement across three independent but cooperating node networks. We've gotten our Proof of Concept up using Ruby on Rails for the nodes, you can see it as the attached link. So far, so good. Now we are looking to convert it into a distributable and are trying to figure out which language is the best for this.

Essentially our needs from the language are: solid networking tools and speed, very fast execution of basic actions, some parallel execution, and able to compile the end product into an easy to distribute and use package for end users.

I was learning Rust, but I have a healthy amount of experience with Swift and right now, it's only me coding. I've only done iOS coding, but have built a fintech app from scratch that's now in the app store so I'm pretty familiar with the language and its benefits. Haven't experimented with Vapor or any of the application development tools, and I wanted to know if it is a crazy idea to develop a blockchain node in Swift instead.

See more
Replies (2)
Recommends
on
RustRust

Pick Rust. Rust can provide all what you need and has been a major language in blockchain/cryptocurrency industry. Swift is slower than Rust and does not have such support in the networking and domain field. Swift tooling is great only on macOS, therefore you are likely to have troubles on other platforms.

See more
Peter Suwara
Director at Realityworks · | 6 upvotes · 109.3K views
Recommends
on
C++C++GolangGolangSwiftSwift

You can use swift of course. It’s more of a question of being performant.

You really want to try some basic operations and find what’s most performant for you.

Rust is wonderful for cloud applications requiring heavy concurrency, it has compile time checking for such things.

Go and C++ could be more performant in your case. Swift is really quite an obtuse language, with a lot of features, some which may complicate your implementation.

Also, you want to consider the market of developers who could help build it. If you use Go or C++ there is a larger collection of people who know the languages than there is with swift.

See more
Youcef Benamare
Needs advice
on
C langC langC++C++
and
C#C#

include include int main(){ char name[10], pasword[10]; printf("enter you user name :"); gets(name); printf("enter your pasword : "); gets(pasword); printf("your name : %s \n your password : %s \n", name, pasword); if ( name != "youcef") { printf("name undefined\n"); } else { printf("finde name"); }

}

his not working

See more
Replies (2)
Richard Rios
Senior Software Engineer · | 5 upvotes · 134.6K views
Recommends
on
C langC lang

You will want to do a few things here. First, replace gets with fgets. Then, you're going to want to use strcmp from string.h to compare the input with the desired result. The code listed below has been updated with a working example with the previously mentioned recommendations. This isn't perfect and there are other ways to accomplish the same task. Explore other options that are available when you have a chance and see if you can improve on this example.

#include <stdio.h>
#include <string.h>

int main()
{ 
    char name[10], 
    pasword[10]; 

    printf("enter you user name :"); 

    // Use fgets as gets is insecure and can easily lead to buffer overflow exploits
    fgets(name, sizeof(char) * sizeof(name), stdin);

    // Remove \n from fgets stdin read with null character so as to not have to include
    // in strcmp later.
    name[strlen(name) - 1] = '\0';

    printf("enter your pasword : "); 
    fgets(pasword, sizeof(char) * sizeof(pasword), stdin);

    printf("your name : %s \n your password : %s \n", name, pasword);

    // If strcmp result > 0 || < 0 it's not a match
    if (strcmp(name, "youcef") != 0) 
    { 
        printf("name undefined\n"); 
    } 
    else 
    { 
        printf("finde name"); 
    }
}
See more
Recommends
on
C langC lang

Dear, Yusuf You can't use if statement to compare two strings, but you can use strcmp() function which means string compare The behavior of strcmp function is: If (string1 < string2)? Then: return a negative value. If (string1 > string2)? Then: return a positive value.

If(string1 == string2)? Then: return (0).

So, you can modify this statment to: if(strcmp(name,"Yousef") != 0) printf("name undefined\n");

else printf("find name");

But, In this case there is one logic problem that (strcmp) function don't ignore the letter case. For example: If you input name : yousef

The first letter here (y) is small, but in the comparing statement above is capital, So the result will be "name undefined", but in fact "yousef" = "Yousef".

To solve this problem you should use stracasecmp() function. This function ignore the letter case while comparing. The code will be: if(strcasecmp(name,"Yousef") != 0) printf("name undefined\n");

else printf("find name");

Attention: Include string libreary after using these functions to skip any problem may be found.

include

may Allah bless you ^_^

See more
Needs advice
on
C++C++JavaScriptJavaScript
and
PythonPython

Hello, I am interested in learning how to program. I am a beginner, and many articles saying I should go with Python if I am new to programming. I considered Lua a long time ago, but for my career, I believe major programming languages should be better for me. I'm considering Python at this moment, but if you have other tools I should use, let me know.

See more
Replies (3)
Pat Fitzner
Recommends
on
PythonPython

Although Lua is a very simple,efficient, elegant and welcoming language, Python is extremely versatile. Therefore, if you want to get into programming without a defined direction, Python is the way to go. It has a lot of libraries, the ability to do anything and it is closer to other languages than Lua is (yeah I know about Lua and C, but from a learner's point of view, it makes sense). Additionally, Python will be a marketable skill, but I for one have not yet seen job offers for Lua devs.

See more
Recommends
on
C langC langC++C++C#C#JavaJava

The language you choose is also dependant on the type of career / area of programming you wish to focus on: Web Based and mobile applicaitons I would lean towards Java, PC Applications I tend to like C#, Embedded industry C, C++

See more
anas mattar
Technical Lead at DPO International · | 2 upvotes · 194.5K views
Recommends

my advice , you should answer me for this question, what do you like to work: web base or mobile native or cross platform. if you like web base you should choose PHP or ASP.net or Node.js or if you like mobile native you should decide Android or IOS platform and else if you like cross platfrom you should learn Flutter with dart language. thanks

See more
Needs advice
on
C++C++JavaScriptJavaScript
and
PythonPython

Hi, I'm just starting to learn code, and I stumbled upon this website. I think I should learn JavaScript, Python, and C++ to begin with. I'm a quick learner so I am only worried about what would be more useful. Suppose my goal is to build an online clothing store or something. Then what languages would be best? I need advice. Please help me out. I'm 13 and just beginning and it's hard to understand when people use technical terms so please keep it simple. Thanks a lot.

See more
Replies (8)
Taimoor Mirza
Associate Software Engineer at Intech Process Automation · | 21 upvotes · 228.1K views
Recommends
on
PythonPython

Go with Python. It's syntax is really simple and less verbose compare to others. You can use Python for basically anything like web dev, task automation, data science, data engineering, cybersecurity etc. At initial level, it's more important to get an understanding of programming fundamentals. Once you get conformable with coding in general, then you can explore other languages.

See more

I would worry less about languages when you're first starting out. If you want to build an online store, then javascript is a great language that is used all over the web! Get comfortable with your first language, learn some computer science concepts and how to build things the right way, and then just work towards a goal and learn as you go!

https://www.w3schools.com/ is a great resource and it's completely free, everything you need to know to build a website is on that page if you have the drive to learn it. Best of luck to you!

Here's a neat roadmap too, in case you find yourself lost on what to learn next https://roadmap.sh/frontend

See more
Recommends
on
JavaScriptJavaScript

I recommend JavaScript to build your first website, for both FrontEnd and BackEnd , even tho I am a BIG fan of C++ it is not well suited yet to create websites, and Python would be just as good for the BackEnd as JavaScript but having everything written in only one language will make your learning curve way easier, so it is easy to recommend JavaScript.

See more
Mukesh Gurpude
Recommends
on
JavaScriptJavaScriptPythonPython

Python is an easy and beginner-friendly language. As you've mentioned about Online Clothing store, you'll need to deal with the website part and you'll need Javascript to make the site accessible and functional. Javascript will be more easy to learn if you learn Python first, so you can just start with Python.

See more
Recommends
on
JavaScriptJavaScript

I have worked with all these a ton. I make ecommerce and enterprise apps now. The only one of these you need is JavaScript. You can use JS on the backend as Node.js in AWS Lambda. You will need HTML and CSS skills, as well as a database. I recommend MongoDB. Please forget about C++ until you built your first company. Python fits the same purpose as Node.js but is currently popular in the Data Science community so skip it until you have a LOT of customers.

See more
Recommends
on
FlaskFlaskPythonPython

Hello Rachel, as a fellow programmer, I am glad that you are planning on expanding your coding knowledge and skills.

I recommend learning python first as it has a very simple syntax (syntax is how your code looks and how simple it is to type) and is also very user-friendly. Once you get to know how to code in python, you can use this thing called Flask.

Flask is what you call a "web application framework" or a WAF, it basically is a tool used to develop websites and other similar things. You don't have to worry much about it's difficulty because it is based on python. You will still have to learn how to use Flask though as it could be a bit complicating in first glance.

If you are looking for simpler ways for making website without having to learn a lot of programming, you can learn HTML and CSS. These 2 will help you in making a basic and functional website. The catch is, from a career perspective, HTML won't get you far, as literally every programmer knows it. So it is best to use programming languages.

I hope this gave you a clear understanding of the ways in which you can build websites. Wishing you the best of luck!

See more
John Akhilomen
Recommends
on
JavaScriptJavaScriptPythonPython

Since you're new, I'd recommend Javascript and Python. With Javascript, just learn React and Node. And with Python, learn Django. With JavaScript, Node, React, Python, and Django; you can accomplish quite a lot for both frontend and backend.

See more
Recommends
on
WordPressWordPress

Hi, When saying that "Suppose my goal is to build an online clothing store or something", I would go for a ready to use platform like Wordpress. it will give you a fast jump into the online world. By using WP you'll have to catch on with PHP\JQuery Goodluck.. Ping me when store is ready, I might buy something....

See more
Needs advice
on
JavaScriptJavaScriptReactReact
and
SwiftSwift

Hey guys, I learned the basics (OOP, data structures & some algorithms) with Python, but now I want to learn iOS development. I am considering to learn Swift, but I am afraid how the native mobile development will die out because of the cross-platform frameworks and reviews. My idea is to learn web development first and then learn React Native, and after all of that, finally Swift. What do you think about this roadmap? Should I just learn Swift first due to the pros of the native apps?

See more
Replies (7)
Recommends
on
SwiftSwift

Native apps are not going to die. Especially not Swift because now Swift can be used to develop cross platform macOS and iOS apps due to the new macs having M1 chips.

See more

The decision comes down to your goals and needs.

If you want to be able to create any kind of iOS app, simple or complex, learn Swift. It's indispensable if you're building specialised apps like video editing, augmented reality, machine learning or anything that uses iOS-specific APIs such as App Clips.

But if you just want to create apps that make HTTP requests and display static content such as text or basic video and music, React Native would do just fine, and you can publish the same code to Android. This is a no-brainer choice if you're on a low budget.

And if you know both, you can use both in the same app. You can add React Native screens or components inside a Swift app.

See more
Recommends
on
SwiftSwift

I would suggest to bet more on Swift! I have developed act in React and Javascript in the past and played around with Swift a little... the performances of native code vs Javascript are way too slow compared to swift native app!

Now even more than ever M1 chip will give a boost, but if it gives a boost to JS it will give a boost also to native apps. I would seriously consider Swift more than Javascript, React or even Electron!

See more
Noel Broda
Founder, CEO, CTO at NoFilter · | 4 upvotes · 73.1K views

"Should I just learn Swift first due to the pros of the native apps?". React Native builds Native Apps. Technologies like ionic does NOT build native apps, but React Native does it.

Learning Swift seems to be a really bad idea from my point of view. Learning JavaScript is all what you need. Why? Because then Frontend, Backend, and Mobile Dev, is simple, because it's all JavaScript.

See more
Recommends
on
SwiftSwift

If asking about employment opportunities, native will never die out. There will always be opportunity for work in native mobile applications. There are also many advantages of using native over cross platform such as always having access to the latest APIs and developer libraries that may not be available to cross-platform without some native development involved or can wait until someone develops a bridge for you.

If you are asking about what you should develop with first? It really depends. React-Native is great for building proto-types or basic MVP application that doesn't require any of the latest and greatest features Apple has to offer at the moment. But if you're asking what to learn? I would say native will always give you a larger advantage as it will give you a good foundation in mobile development and provide you access to the latest native libraries. It is also a useful skill that can give you an edge in cross-platform mobile like react-native because you will most definitely encounter a situation where you will have to go down to the to native side to extend functionality or utilize APIs that are not yet out of the box.

See more
Carlos Iglesias
Recommends

Mobile Native Development Apps will never die. Cross Plataform like React Native only exists to save time and costs for startups mainly, which is extraordinary, and indispensable often of course. But when the App get popular enough, it will probably will move to Native Development. Several improvements.

See more
Recommends
on
JavaScriptJavaScriptReactReact

Less than 20% of the market is IOS, the rest is Android. Any developer must produce for Android and maybe support IOS. If you prototype on IOS you have to restart again for Android. React and JavaScript will run on IOS.

See more
Decisions about C++ and Swift
James Bender
Lead Application Architect at TekPartners · | 5 upvotes · 50.1K views

I've yet to see a non-native application that I felt performed as well and/or provided the same user experience with Cordova/PhoneGap/Xamarin. Frankly, at best they all seemed like underpowered web applications deployed to a sandbox that ran on a phone. They didn't feel "slick" or "mobile-first" and in some cases the performance was unacceptable. At previous companies, we built a few of these apps at the client's insistence, and in every case, they re-engaged us about 18 months later to re-write the app(s) natively.

We are doing some research on React Native and Flutter, but I am not yet convinced that they can provide the same level of experience and performance as native, though I am trying to keep an open mind.

See more
Ismael Ghanim
Senior Mobile Engineer at Homecoming · | 5 upvotes · 71.2K views

We chose React Native over native Android and iOS development because of React Native's cross-platform capabilities. React Native has really matured over the years, developing a native feel, with simple and intuitive APIs. The community is also huge, filling in any gaps in the default APIs. These are also the reasons why we didn't choose other hybrid mobile tools. Largely, other hybrid mobile tools don't have the same mobile feel and close connection to the underlying mobile APIs.

At a larger scale, the control that native development offers beats React Native's simplicity. However, at this early stage, it's worth the trade-off. Maintaining two mobile teams and two mobile apps, as we iterate the product rapidly would not be practical. Plus, there is always the escape hatch of native modules if more control is needed.

See more
Gabor Galazzo

As a startup, we need the maximum flexibility and the ability to reach our customers in a more suitable way. So a hybrid application approach is the best because it allows you to develop a cross-platform application in a unique codebase. The choice behind Ionic is Angular, I think that angular is the best framework to develop a complex application that needs a lot of service interaction, its modularity forces you (the developer) to write the code in the correct way, so it can be maintainable and reusable.

See more
Lucas Litton
Founder & CEO at Macombey · | 7 upvotes · 182K views

Expo was a tool Macombey really wanted to utilize from the beginning. I have been working with React Native since 2016 and originally I had to use simulators in Xcode, install pods on top of node packages, configure certificates, and more abundant objectives that take time away from actual development. As a development studio, we have to move quick and get projects to our clients and partners in a matter of months.

Expo made this easy for us. We now have a mobile app for clients to download and test their project on, there is no need to install pods or configure Xcode, and development is super fast and reliable now.

See more
Alexandre Desroches
Founder & Developper at Finance D · | 71 upvotes · 339K views

I had a goal to create the simplest accounting software for Mac and Windows to help small businesses in Canada.

This led me to a long 2 years of exploration of the best language that could provide these features:

  • Great overall productivity
  • International wide-spread usage for long-term sustainability and easy to find documentation
  • Versatility for creating websites and desktop softwares
  • Enjoyable developper experience
  • Ability to create good looking modern UIs
  • Job openings with this language

I tried Python, Java, C# and C++ without finding what I was looking for.

When I discovered Javascript, I really knew it was the right language to use. Thinking of this today makes me realize even more how great a decision this has been to learn, use and master Javascript. It has been a fun, challenging and productive road on which I am still satisfied.

Obviously, when I refer to Javascript, it is not without implying the vast ecosystem around it. For me, JS is a whole universe in which almost every imaginable tools exist. It's awesome - for real. Thanks to all the contributors which have made it possible.

To be even clearer about how intense I am with Javascript, let's just say that my first passion was music. Until, I find coding with Javascript! Yep, I know!

So in conclusion, I chose Javascript because it is versatile, enjoyable, widely used, productive for both desktop softwares and websites with ability to create modern great looking user interfaces (assuming HTML and CSS are involved) and finally there are job openings.

See more

Python has become the most popular language for machine learning right now since almost all machine learning tools provide service for this language, and it is really to use since it has many build-in objects like Hashtable. In C, you need to implement everything by yourself.

C++ is one of the most popular programming languages in graphics. It has many fancy libraries like eigen to help us process matrix. I have many previous projects about graphics based on C++ and this time, we also need to deal with graphics since we need to analyze movements of the human body. C++ has much more advantages than Java. C++ uses only compiler, whereas Java uses compiler and interpreter in both. C++ supports both operator overloading and method overloading whereas Java only supports method overloading. C++ supports manual object management with the help of new and delete keywords whereas Java has built-in automatic garbage collection.

See more
Noel Broda
Founder, CEO, CTO at NoFilter · | 5 upvotes · 229.8K views

1 code deploys for both: Android and iOS. There is a huge community behind React Native. And one of the best things is Expo. Expo uses React Native to make everything even more and more simple. Awesome technologies. Some other important thing is that while using React Native, you are reusing all JavaScript knowledge you have in your team. You can move easily a frontend dev to develop mobile applications.

A huge PRO of Expo, is that it includes a full building process. You run 1 line in the terminal, and 10 minutes after you have 2 builds done. Double check EAS Expo.

See more
Russtopia Labs
Sr. Doodad Imagineer at Russtopia Labs · | 0 upvote · 197.1K views

As a personal research project I wanted to add post-quantum crypto KEM (key encapsulation) algorithms and new symmetric crypto session algorithms to openssh. I found the openssh code and its channel/context management extremely complex.

Concurrently, I was learning Go. It occurred to me that Go's excellent standard library, including crypto libraries, plus its much safer memory model and string/buffer handling would be better suited to a secure remote shell solution. So I started from scratch, writing a clean-room Go-based solution, without regard for ssh compatibility. Interactive and token-based login, secure copy and tunnels.

Of course, it needs a proper security audit for side channel attacks, protocol vulnerabilities and so on -- but I was impressed by how much simpler a client-server application with crypto and complex terminal handling was in Go.

$ sloc openssh-portable 
  Languages  Files    Code  Comment  Blank   Total  CodeLns
      Total    502  112982    14327  15705  143014   100.0%
          C    389  105938    13349  14416  133703    93.5%
      Shell     92    6118      937   1129    8184     5.7%
       Make     16     468       37    131     636     0.4%
        AWK      1     363        0      7     370     0.3%
        C++      3      79        4     18     101     0.1%
       Conf      1      16        0      4      20     0.0%
$ sloc xs
  Languages  Files  Code  Comment  Blank  Total  CodeLns
      Total     34  3658     1231    655   5544   100.0%
         Go     19  3230     1199    507   4936    89.0%
   Markdown      2   181        0     76    257     4.6%
       Make      7   148        4     50    202     3.6%
       YAML      1    39        0      5     44     0.8%
       Text      1    30        0      7     37     0.7%
     Modula      1    16        0      2     18     0.3%
      Shell      3    14       28      8     50     0.9%

https://gogs.blitter.com/RLabs/xs

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of C++
Pros of Swift
  • 200
    Performance
  • 106
    Control over memory allocation
  • 97
    Cross-platform
  • 95
    Fast
  • 84
    Object oriented
  • 57
    Industry standard
  • 47
    Smart pointers
  • 37
    Templates
  • 16
    Gui toolkits
  • 16
    Raii
  • 13
    Generic programming
  • 13
    Control
  • 13
    Flexibility
  • 11
    Metaprogramming
  • 9
    Hardcore
  • 5
    Simple
  • 5
    Full-fledged containers/collections API
  • 5
    Many large libraries
  • 4
    Performant multi-paradigm language
  • 4
    Large number of Libraries
  • 3
    Way too complicated
  • 1
    Close to Reality
  • 1
    Plenty of useful features
  • 259
    Ios
  • 180
    Elegant
  • 126
    Not Objective-C
  • 107
    Backed by apple
  • 93
    Type inference
  • 61
    Generics
  • 54
    Playgrounds
  • 49
    Semicolon free
  • 38
    OSX
  • 36
    Tuples offer compound variables
  • 24
    Clean Syntax
  • 24
    Easy to learn
  • 22
    Open Source
  • 21
    Beautiful Code
  • 20
    Functional
  • 12
    Dynamic
  • 12
    Linux
  • 11
    Protocol-oriented programming
  • 10
    Promotes safe, readable code
  • 9
    No S-l-o-w JVM
  • 8
    Explicit optionals
  • 7
    Storyboard designer
  • 6
    Optionals
  • 6
    Type safety
  • 5
    Super addicting language, great people, open, elegant
  • 5
    Best UI concept
  • 4
    Its friendly
  • 4
    Highly Readable codes
  • 4
    Fail-safe
  • 4
    Powerful
  • 4
    Faster and looks better
  • 4
    Swift is faster than Objective-C
  • 4
    Feels like a better C++
  • 3
    Easy to learn and work
  • 3
    Much more fun
  • 3
    Protocol extensions
  • 3
    Native
  • 3
    Its fun and damn fast
  • 3
    Strong Type safety
  • 3
    Easy to Maintain
  • 2
    Protocol as type
  • 2
    All Cons C# and Java Swift Already has
  • 2
    Esay
  • 2
    MacOS
  • 2
    Type Safe
  • 2
    Protocol oriented programming
  • 1
    Can interface with C easily
  • 1
    Actually don't have to own a mac
  • 1
    Free from Memory Leak
  • 1
    Swift is easier to understand for non-iOS developers.
  • 1
    Numbers with underbar
  • 1
    Optional chain
  • 1
    Great for Multi-Threaded Programming
  • 1
    Runs Python 8 times faster
  • 1
    Objec

Sign up to add or upvote prosMake informed product decisions

Cons of C++
Cons of Swift
  • 8
    Slow compilation
  • 8
    Unsafe
  • 6
    Over-complicated
  • 6
    Fragile ABI
  • 5
    No standard/mainstream dependency management
  • 4
    Templates mess with compilation units
  • 3
    Too low level for most tasks
  • 1
    Compile time features are a mess
  • 1
    Template metaprogramming is insane
  • 1
    Segfaults
  • 1
    Unreal engine
  • 5
    Must own a mac
  • 2
    Memory leaks are not uncommon
  • 1
    Very irritatingly picky about things that’s
  • 1
    Complicated process for exporting modules
  • 1
    Its classes compile to roughly 300 lines of assembly
  • 1
    Is a lot more effort than lua to make simple functions
  • 0
    Overly complex options makes it easy to create bad code

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is C++?

C++ compiles directly to a machine's native code, allowing it to be one of the fastest languages in the world, if optimized.

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.

Need advice about which tool to choose?Ask the StackShare community!

What companies use C++?
What companies use Swift?
See which teams inside your own company are using C++ or Swift.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with C++?
What tools integrate with Swift?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

May 6 2020 at 6:34AM

Pinterest

JavaScriptC++Varnish+6
5
3353
Oct 24 2019 at 7:43PM

AppSignal

JavaScriptNode.jsJava+8
5
948
GitHubPythonNode.js+47
54
72278
GitHubSlackNGINX+15
28
20901
What are some alternatives to C++ and Swift?
C lang
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
C#
C# (pronounced "See Sharp") is a simple, modern, object-oriented, and type-safe programming language. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers.
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.
HTML5
HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.
See all alternatives