Carbon Lang First Look & Crash Course | Google's C++ Successor

  Рет қаралды 106,048

Traversy Media

Traversy Media

Күн бұрын

Carbon is Google's new C++ successor. In this video, we will talk a little bit about it and then look at the basic syntax including variables, data types, arrays, tuples, classes, generics and more.
💻 Carbon Main Repo:
github.com/carbon-language/ca...
✅ Gist File From Video:
gist.github.com/bradtraversy/...
⭐ My Courses & More
traversymedia.com
💖 Show Support
Patreon: / traversymedia
PayPal: paypal.me/traversymedia
👇 Follow Me On Social Media:
Twitter: / traversymedia
Instagram: / traversymedia
Linkedin: / bradtraversy
Timestamps:
0:00 - Intro
1:37 - Carbon - What & Why?
7:26 - Setup With Homebrew
13:15 - Package Namespace
14:16 - Main() Function
16:40 - Print() Function
18:00 - Creating Functions
19:40 - Primitive Data Types
21:37 - Naming Conventions
22:14 - Variables
24:15 - let Keyword
26:22 - auto Type
27:06 - Global Variables & Scope
28:52 - Multi-Line Strings
29:27 - Function Arguments
31:49 - Arrays
35:10 - Tuples
37:42 - Structs
41:11 - Classes & Objects
43:32 - Class Methods
46:10 - Class Functions
47:52 - Pointers
52:35 - If Else Statements
54:55 - Match Statement
59:04 - While Loops
1:01:32 - Generics
1:05:22 - Outro

Пікірлер: 214
@tbn4lyfe
@tbn4lyfe Жыл бұрын
I watched this video 10 times and now have the required 10 years of Carbon experience for my unpaid internship. Thanks Brad!
@johnsmithsu310
@johnsmithsu310 Жыл бұрын
Men approved 👍
@redcrafterlppa303
@redcrafterlppa303 Жыл бұрын
Hey I wanted to make the years experience joke 🤣
@0xN1nja
@0xN1nja Жыл бұрын
W
@chriswinslow
@chriswinslow Жыл бұрын
I was pleasantly surprised that you have already covered carbon in such depth. I will be following Carbons development and adaptation very closely. Thank you for providing yet another great course for all to watch for free.
@dabunnisher29
@dabunnisher29 Жыл бұрын
It's great to see you again Brad. You are always one of my favorites. Thanks for all that you do.
@theophilus494
@theophilus494 Жыл бұрын
The fact you picked up this to teach us .. I'm grateful...
@JalalMitali
@JalalMitali Жыл бұрын
thanks Brad I used to learn from you a lot but now I started my own KZbin channel to teach mobile development to be specific react native and flutter hope the community supports me thanks!
@corewwwi
@corewwwi Жыл бұрын
i wasn't expecting a tutorial about this language anytime soon... i liked it!
@JuniorBloxHD
@JuniorBloxHD Жыл бұрын
31:01 `var` makes the parameter mutable, instead of immutable by default.
@muonx9649
@muonx9649 Жыл бұрын
kudos!
@Elite7555
@Elite7555 Жыл бұрын
I have always thought D to be the unofficial C++ successor. But after years of using D, I have to admit that D feels like a second broken C++. So I am really excited how Carbon goes.
@peramoredellanalisi4341
@peramoredellanalisi4341 Жыл бұрын
There will not be a C++, am sorry to disappoint you. If you want to learn a programming language different from C++, of course you're welcome. Forget about successor, just code in the language you like and don't spend unnecessary time talking about impossible things. C++ will not disappear, don't worry. I personally go for C++ and will not spend 1 minute of my time learning this kind of language. It's a matter of having different interests.
@carlbrenner7078
@carlbrenner7078 Жыл бұрын
@@peramoredellanalisi4341 Okay, but who asked you? It's so irritating that every time a new language pops up, or even just some kind of a new concept, overconfident foretellers show up en mass to tell everyone how shit that new thing is and there's only one truity, the one that they are already familiar with. You guys are boring.
@peramoredellanalisi4341
@peramoredellanalisi4341 Жыл бұрын
​@@carlbrenner7078 Hey Genius, first of all, your comment is trivial because i can apply it the way round: every time that a new language pops up, overconfident creators and haters of well-established programming languages show up and spam their videos to tell everyone how better is the new thing there's only one "truiity" (the new of course). How does it sound? Second, i don't disagree at all with novelty! The point is NOT novelty. The point is the wrong propaganda around the new entries, which are brought out as the only possible choice that will replace that annoying old language.That's MISINFORMATION! That's disseminating false ideas. Because though the new languages bring new aspects of novelty, you cannot impose that the ENTIRE world based, for instance, on C++ can be totally replaced by one new language. For example, who uses C++ for games and scientific computing, do you think they have desire to step on a new esotheric language?? Why??? That language might meet specific needs that have not been met by other languages, which is fine. But replacing entirely is a pure dream. At least do avoid misinformation. Stroustrup says that C++ will be on the edge for up to 2 decades.
@Elite7555
@Elite7555 Жыл бұрын
@@peramoredellanalisi4341, what are you talking about 🤣?
@lane1313
@lane1313 Жыл бұрын
What about D do you find it has failed at? I'm just beginning to learn D and after a year of learning C++ it seems D offers so much more improvements and conveniences.
@provokator-provocateur7603
@provokator-provocateur7603 Жыл бұрын
You are very fast. Carbon is a new and fresh thing right now and you already did crash course.
@georgereasonproductions
@georgereasonproductions Жыл бұрын
enjoyed this very much indeed keep up the good work:)
@JaskoonerSingh
@JaskoonerSingh Жыл бұрын
It would have been cool if you showed Carbon interoperability with CPP. That is the killer reason for this language. In the same way Kotlin can use Java.
@geeksuperstar8564
@geeksuperstar8564 Жыл бұрын
Check Nim or Zig if you want modern languages with great C-Cpp interoperability bro.
@JaskoonerSingh
@JaskoonerSingh Жыл бұрын
@@geeksuperstar8564 ok
@JaskoonerSingh
@JaskoonerSingh Жыл бұрын
@@geeksuperstar8564 these languages are like rust, where the interoperability is through the c language, not CPP.
@clarinetmaster5990
@clarinetmaster5990 Жыл бұрын
The interop hasn’t been implemented in the explorer interpreter iirc.
@tekhiun
@tekhiun Жыл бұрын
Funny thing is that Kotlin Native also has interop with Cpp , but for reason it didn't took off.
@philmarsh7723
@philmarsh7723 Жыл бұрын
This is the right way to design new programming languages. Interoperability with the incumbents is absolutely necessary.
@thedevnoteyt
@thedevnoteyt Жыл бұрын
Thanks Brad, you're awesome ❤️🔥
@Arabian_Epileptic
@Arabian_Epileptic Жыл бұрын
your username lol, it is the git command :)
@geeksuperstar8564
@geeksuperstar8564 Жыл бұрын
No need for Carbon, go check Nim and Zig guys. Both have great interoperability with C and C++, both are really fast, both have the "issues" of C and C++. And you will have a lot of fun using them.
@InarusLynx
@InarusLynx 19 күн бұрын
Ah takes me back to junior year at college. I took C++ because I liked my first year C class. I liked C++ so much, I used the internet to learn python. Then I wanted to make a Windows app so I learned C#. Then web dev with JavaScript. Now here I am because I heard about Carbon. Full circle. What a ride it's been.
@michaelshort2388
@michaelshort2388 Жыл бұрын
to get code highlighting working, change the file extension to ".carb" it still compiles fine but you get code highlighting. :)
@coolmn786
@coolmn786 Жыл бұрын
I see potential on this, gonna make a few stuff on this
@sumitkumarsoni1
@sumitkumarsoni1 Жыл бұрын
Brad It was a Joke!!! But seriously, You are great, Learnt so much from you and Love your videos ❤
@SaeedAhmed-wl7pb
@SaeedAhmed-wl7pb Жыл бұрын
Thanks a lot for this great video man !
@Sadleafsfan
@Sadleafsfan Жыл бұрын
I can already see the job postings requiring 10 years of Carbon Lang experience
@codedbyshoe
@codedbyshoe Жыл бұрын
If this goes the way that other google languages have gone this will most likely have a great future
@stiflenthegamer4447
@stiflenthegamer4447 Жыл бұрын
Heyo, I'm a bit new to this, so forgive me if I seem ignorant; I'm trying to get Carbon set up with Homebrew on my Windows machine, I'm using WSL for that, however when I try to install the required packages with Homebrew, it pauses my installation indefinitely, if I try to go to the URL it's downloading from, I get the error code "UNAUTHORIZED" and the message "authentication required", I'm completely stumped as for what I should do, so any help would be greatly appreciated!
@ltc0060
@ltc0060 Жыл бұрын
Carbon seems like what you get if you tried to get cool features of other languages, then mix and mash them together.
@ivanhale8114
@ivanhale8114 Жыл бұрын
The extension works if you use .carb as the file extension. It still runs, too
@liamconverse8950
@liamconverse8950 Жыл бұрын
New languages that google came out with have actually seen growth and use cases like dart/flutter and go. So might be useful to learn relatively early on.
@20cmusic
@20cmusic Жыл бұрын
I haven't seen a deveolper who actually use dart or go in corporate system.
@vanshajdhar9223
@vanshajdhar9223 Жыл бұрын
@@20cmusic 🤣🤣🤣🤣, seriously???
@liamconverse8950
@liamconverse8950 Жыл бұрын
@@20cmusic yeah it's definitely a small segment of the overall industry but there are some businesses who use it
@emisosa
@emisosa Жыл бұрын
Dart and flutter are the most horrible languages I've seen. Go is nice. For simple prototyping. But this is one of the first ones that are not interpreted languages.
@alexripoll2893
@alexripoll2893 Жыл бұрын
@@20cmusic Go is being used by many new companies or companies that are refactoring their legacy code. Its use is actually growing quite fast
@hrudayd4217
@hrudayd4217 Жыл бұрын
Hello @traversymedia Can you please create the videos for SAP UI5? In youtube also no much videos on this framework, Thanks in advance
@diveshkumar1757
@diveshkumar1757 Жыл бұрын
Hi is there a way to send push notifications to 2000+ users with in 2 milli seconds using laravel and react native. Please help me with this or any system design for this module. Thanks
@V1kToo
@V1kToo Жыл бұрын
really well covered
@cd-stephen
@cd-stephen Жыл бұрын
I appreciate you and your channel
@jaimedpcaus1
@jaimedpcaus1 Жыл бұрын
Great video 👍. So, if this is an experimental Lang. When or how is one to know that it's not experimental any longer?
@carlosmspk
@carlosmspk Жыл бұрын
They'll likely tag the relase on GitHub as such, followed by numerous blogposts and news mentioning the fact...
@jaimedpcaus1
@jaimedpcaus1 Жыл бұрын
@@carlosmspk Ah. Thx Capuccino.
@Alexithymiander
@Alexithymiander Жыл бұрын
Sounds like Carbon isn't actually a new language, but rather an exoskeleton that reinforces proper movement with increased strength.
@jamesbond_007
@jamesbond_007 Жыл бұрын
Some of the tests DO show the use of relational operators, and they are not marked as failing tests. Still wondering about where that for loop is. I guess if you're coming from C++, all the wordiness of the syntax isn't so bad, but compared with other modern language, the syntax of Carbon leaves a lot to be desired.
@carlosmspk
@carlosmspk Жыл бұрын
I didn't follow, what was the problem with Carbon's "wordiness"? Compared to other statically typed languages, of course...
@larrytron1992
@larrytron1992 Жыл бұрын
I've been looking into it for the last few days, it looks promising but still has a long way to go I'm interested to see how they will extend it if they're going to be a "C++ killer/successor"
@comichacker
@comichacker Жыл бұрын
Please elaborate.
@funnynews341
@funnynews341 Жыл бұрын
i love this channel so much. I learn from them so much. But why they don't make Carsh Course about Rust like backend API with actix and deploy in production
@enfieldli9296
@enfieldli9296 Жыл бұрын
Heard enough of those 10X years experince with Carbon in hiring memes, let's learn some real solid stuff!
@DanielNistrean
@DanielNistrean Жыл бұрын
In the beginning I throught that Carbon is trying to adopt Typescript syntax for C++, but it's not, there are differences so this language has no value to me personally.
@novailoveyou
@novailoveyou Жыл бұрын
Brad you're the best!
@adamjones7497
@adamjones7497 Жыл бұрын
Pascal case is when you use camel case with the starting character as uppercase.
@huydong3292
@huydong3292 Жыл бұрын
Thank you.
@glumboi9946
@glumboi9946 Жыл бұрын
How do u set this up in windows if its even possible?
@RohanSaluja-xj8ly
@RohanSaluja-xj8ly Жыл бұрын
Hi, I'm on macOS High Sierra and I'm having a hard time setting up the environment. Homebrew doesn't support High Sierra anymore but we can still somehow use it. I tried installing llvm using macPorts, it kinda installed but then I tried using "brew install llvm". All the related dependencies were installed successfully, yet I'm unable to use "llvm-config". And this "bazel run //explorer -- ./test.carbon" does not build successfully. Reflecting error -> llvm-ar not found in PATH or adjacent to clang
@marvinabarquez8915
@marvinabarquez8915 Жыл бұрын
Will they be monitoring this too? Like, will they be taking snippets of code and clone the code if they determine that the code a dev makes is worthwhile?
@tissueweb
@tissueweb Жыл бұрын
Thank you
@alex_chugaev
@alex_chugaev Жыл бұрын
I wish typescript could’ve been compiled for production use.
@sourandbitter3062
@sourandbitter3062 Жыл бұрын
What, why?
@alex_chugaev
@alex_chugaev Жыл бұрын
@@sourandbitter3062 it has powerful types system, maybe the best among all PLs, but still does not have its own runtime/compiler. Ideally it should support 2 modes: compiled (for max performance) and interpreted (for development convenience). When you’re ready to release you just compile it and get the binary file just like C# for example.
@khudadatbaluch7884
@khudadatbaluch7884 Жыл бұрын
thanks, a good one.
@AkashdeepSingh-qq5fw
@AkashdeepSingh-qq5fw Жыл бұрын
12:04 could it be because your file is test.carbon and not test.carb?
@GlobalYoung7
@GlobalYoung7 Жыл бұрын
Thank you 😊
@0file0
@0file0 Жыл бұрын
The highlighting works but the file ending has to be .carb instead of .carbon in vscode.
@JuniorBloxHD
@JuniorBloxHD Жыл бұрын
You can also go to settings and add an association for "*.carbon" to "carbon".
@fantasypvp
@fantasypvp Жыл бұрын
Just from the first 5 minutes of the video, I can see that carbon seems like it took a fair bit of inspiration from rust...
@TheMR-777
@TheMR-777 Жыл бұрын
17:04 That happens all the time, while working in online editor
@TheMR-777
@TheMR-777 Жыл бұрын
@WhatsApp±1217𝟽𝟻𝟶𝟹𝟹33 Traversy Med 😅
@zulfiqar7967
@zulfiqar7967 Жыл бұрын
Any idea about doing web 3.0 tutorials and crash course
@dhawalparmar7117
@dhawalparmar7117 Жыл бұрын
Hey Traversy media can you make video on spring boot
@gabrielmachado5708
@gabrielmachado5708 Жыл бұрын
well, if it's just that, why not just supporting zig?
@shreeyashghatpande
@shreeyashghatpande Жыл бұрын
vsc now has Carbon so yay
@chrisik100
@chrisik100 Жыл бұрын
Why "to kill" C++ or some other PL at all?
@ctkqiang
@ctkqiang Жыл бұрын
What about V Lang?
@BobDoe_69
@BobDoe_69 Жыл бұрын
oh no, time to update my cv with "5+ years working with Carbon"
@deejaydev
@deejaydev Жыл бұрын
C++ is never gonna die
@Arabian_Epileptic
@Arabian_Epileptic Жыл бұрын
It is the OG language :)
@sugy9310
@sugy9310 Жыл бұрын
Well now i have to get 10 years experience on this
@dunai2012
@dunai2012 Жыл бұрын
Isn't D the C/C++ successor?
@papa_ethan
@papa_ethan Жыл бұрын
If Carbon can do Web Assembly then great.
@qkiee
@qkiee Жыл бұрын
17:04 he press Ctrl+S by muscle memory lol
@broccoloodle
@broccoloodle Жыл бұрын
Thank you for the great summary. Looks like carbon is no thing more than a syntactic sugar language. No more no less, the design choice is even worst than other languages
@abhikbanerjee3719
@abhikbanerjee3719 Жыл бұрын
Offé. That's 6G speed right there.
@Arabian_Epileptic
@Arabian_Epileptic Жыл бұрын
Carbon Fiber internet 😄
@awuk3468
@awuk3468 Жыл бұрын
I think there is a reason why C/C++ has stuck around for so long, one of the reasons in my opinion is it doesn't need replacing. Maybe it would be better calling it a alternative rather than a "successor" to C++, if it had GUI capabilities (Does it?) it might be a good alternative to C++ but I think .NET Core has that covered with .NET MAUI not sure how good / bad it is, or even if it has been released to the wild yet. Although as most things seem to be web orientated I favour the likes of Electron for GUI projects these days.
@AXYGaming
@AXYGaming Жыл бұрын
You can write gui applications in C and C++ with gtk, qt and imgui. Those would be a better choice than maui and electron in certain cases where performance is vital, like when doing graphics. And they call it a successor because it has interoperability with cpp which alot of other languages also have but it's very annoying to do since cpp mangles function names.
@davidg4512
@davidg4512 Жыл бұрын
Tomorrows job post: 5 years of Carbon
@taiwoadebola5617
@taiwoadebola5617 Жыл бұрын
Brad how do you learn so quickly?
@mohammadmahdifarnia5358
@mohammadmahdifarnia5358 Жыл бұрын
I’m not that excited about this language like others because i like C++ for its different syntax. If you wanna print to stdout you should use
@robypsx
@robypsx 3 ай бұрын
waiting for the 50 year Carbon experience jobs when Google decides to drop the v0.1
@atticus2581
@atticus2581 Жыл бұрын
this video is going to get so many views lmfao
@motaz_ahmed
@motaz_ahmed Жыл бұрын
There is new think about it?
@MehmetTEMEL123
@MehmetTEMEL123 Жыл бұрын
Generic type about more video pls.
@QueeeeenZ
@QueeeeenZ Жыл бұрын
Companies be like "We are looking for a Carbon developer with 10 years of experience"
@Arabian_Epileptic
@Arabian_Epileptic Жыл бұрын
And its been out for just 2 years lol
@ggtiasmagg
@ggtiasmagg Жыл бұрын
@@Arabian_Epileptic weeks*
@Arabian_Epileptic
@Arabian_Epileptic Жыл бұрын
@@ggtiasmagg even less haha
@alisherdotdev
@alisherdotdev Жыл бұрын
Make new Rust Crash Course please
@alisherdotdev
@alisherdotdev Жыл бұрын
@♜ Pinned by Traversy Media Okay
@skatemaster33
@skatemaster33 Жыл бұрын
The syntax actually looks like a soup of all the different languages combined and doesn't look consistent at all
@eddycizeron2533
@eddycizeron2533 Жыл бұрын
What's the point in creating a course for Carbon intended for newcomers in programming? The main audience of this language is (according to its authors) teams that already have huge codebases in C++. The goal is to help them migrate smoothly to a cleaner language. Whether you believe Carbon can achieve this or not, it still means that the intended audience are C++ developers. As a consequence, a valuable presentation should try to expose similarities and differences with C++ (and possibly other languages). In case of differences I would also expect some explanations about what motivated these changes. Of course the creator of this video cannot read in Carbon's author's minds but any guess or suggestions (with all the necessary caveats) would be far more valuable that this sequence of trivialities that focuses on (part of) the syntax and does not even address the motivation behind it.
@stiflenthegamer4447
@stiflenthegamer4447 Жыл бұрын
Well even if the targeted demographic is veteran users of C++, I still believe there should be resources such as this specifically for newcomers. I personally have tried learning C++, but never really got around to it, now with Carbon being in the works, I decided I would give it a go instead, so I can atleast say I greatly appreciate videos like this.
@skyheart9245
@skyheart9245 Жыл бұрын
These languages are not solving any important issues. C, C++, Java(including all java technologies) and JavaScript they were targeting issues that led to evolution. It was critical to learn and use.
@TheLoLStarsChannel
@TheLoLStarsChannel Жыл бұрын
If these iterative/evolutionary languages are not solving any important issues, then why are so many programmers choosing them? What problems does Typescript address relative to Javascript? Are memory safety and type safety unimportant issues from a technical and even business perspective?
@skyheart9245
@skyheart9245 Жыл бұрын
@@TheLoLStarsChannel There aren’t so many choosing them. Look at top 5! TypeScript is “evolutionary” in your mind? 😂 TypeScript is JavaScript btw. JavaScript had to be there because there had to be a script on html so people HAD to learn it. That’s evolution. Same thing to other languages I mentioned. What you are talking about is minor changes. Kotlin came with some interesting features now Java filled the gap so no point choosing it anymore. Plus no language can replace C/C++ in its domain. Millions of people know it and have lots of experience with it and there is a huge ecosystem of libraries and software around it if you don’t know something there are array of options to find your answers, as a business you won’t risk picking a new language just because it’s easier to do something minor. No problem with new ideas but I’ve seen hundreds of languages within last 12 years none could become popular.
@TheLoLStarsChannel
@TheLoLStarsChannel Жыл бұрын
@@skyheart9245 I don't think you understand what the word evolution means. Perhaps you're confusing with revolution/revolutionary? Where do Rust, Go, and Swift fall into this?
@skyheart9245
@skyheart9245 Жыл бұрын
@@TheLoLStarsChannel Good for you that understand it. I’m not here to play with words like you. None of these languages are popular, doesn’t mean no body is using it. Doesn’t mean these are technically bad languages. Swift is only for apple devices, Its not general purposed language. Rust is good but again good language doesn’t mean it will get popular, it’s not essential to learn, because you can do the same with many other languages. PHP is another example, it’s a terrible language but super popular, because it arrived right time and because of that many people started using it. Huge ecosystem around php. There are many languages in the same league as php but could not survive. Good luck
@TheLoLStarsChannel
@TheLoLStarsChannel Жыл бұрын
@@skyheart9245 thanks. Good luck to you too friend 🙂
@MrZapper1960
@MrZapper1960 Жыл бұрын
This better not blow up with the standard lib using the google style guide
@edwardkenworthy7013
@edwardkenworthy7013 Жыл бұрын
That example code at around 1 minute is such a mess.
@teckyify
@teckyify Жыл бұрын
Whoever thinks the reason why people don't migrate to other languages or newer languages because they don't want change has absolutely zero clue about what C++ users actually have to deal with or the reasons they use C++
@MattPryze
@MattPryze Жыл бұрын
Yeah seems like more typing to get the same thing.
@sidforreal
@sidforreal Жыл бұрын
Hiring Carbon Developers : Min experience 2 year
@Meritumas
@Meritumas Жыл бұрын
2y for junior, min 7 for seniors....
@amazekhashaa7309
@amazekhashaa7309 Жыл бұрын
give me a reason to use carbon
@MiChEaLaDeNuGa-oj6wb
@MiChEaLaDeNuGa-oj6wb Жыл бұрын
c++
@narendra672
@narendra672 Жыл бұрын
👏👍😀🎄🌈
@denhoward6438
@denhoward6438 Жыл бұрын
become new C++ successor is difficult
@navjotsingh2251
@navjotsingh2251 Жыл бұрын
Difficult, but not impossible. The language needs to provide the benefits of c++ but add modern features, and most importantly needs to match similar speeds and provide backwards compatibility. Carbon, rust and D are attempting this and are all interesting options.
@yourfuture1265
@yourfuture1265 Жыл бұрын
please do a video combining codeigniter and react.js
@_thehunter_
@_thehunter_ Жыл бұрын
rust competitor
@pett22v20
@pett22v20 Жыл бұрын
cool new language, too bad all of the jobs already require 8-10 years experience in carbon
@n.m4497
@n.m4497 Жыл бұрын
Kinda of ridiculous to do an arrow to specify the type return of a function. Why not put it at the begging
@CoderzF1
@CoderzF1 Жыл бұрын
its having Kotlin vibes
@KejriwalBhakt
@KejriwalBhakt Жыл бұрын
Just a question, why can't the tech giants comes up with syntax like Python and be as fast as CPP? Just curious. What are the bottlenecks? Last I learnt, the thing that makes python slow is duck typing. Make it statistically typed. By now Python has best syntax and readibility. Go comes close second and then JAVA and Javascript. I hate CPP and don't ask why.
@keelanmccarthy5291
@keelanmccarthy5291 Жыл бұрын
It's because python is compiled into bytecode that is read by a virtual machine. Python is compiled at runtime... Every language eventually turns into machine code to tell the CPU what to do, Python is not as fast because of a combination of, virtual machine, compiled at runtime and the fact that the less descriptive code is to do compiler, the less efficient the compiler will be at finding the fastest bytecode/machine code to run that program. With python, you trade the speed of the actual program with development time.
@Robert-zc8hr
@Robert-zc8hr Жыл бұрын
@@keelanmccarthy5291 The question was "why can't the tech giants comes up with syntax like Python and be as fast as CPP? ", you completely missed the point. There is no reason why you can't make a compiled version of Python (e.g. Numba or Cython). Or create a new fast programming language with a syntax similar to python. The issue is that big tech wants to make something familiar, thus following current popularity trends. Although Python is popular in the scientific community, it has almost no market share when it comes to general/systems programming, in that space C++/C#/Java/TypeScript/Rust all use a C-like syntax and combined have almost all market share.
@tipseason
@tipseason Жыл бұрын
Carbon language has certainly a refreshing syntax compared to C++. The more you try hands on with it, the more you appreciate the beauty of it. Do you think carbon language will replace C++ ?
@wizardy6267
@wizardy6267 Жыл бұрын
As a firmware developer using c++, kotlin, JS reactnative and python, I can see why Carbon is NOT going to replace c++... it is boring
@benitaisabella1152
@benitaisabella1152 Жыл бұрын
Mr Theodore Travis is legit and his method works like magic I keep on earning every single week with him new strategy
@cointelegraph7527
@cointelegraph7527 Жыл бұрын
I lost $1500 carelessly trading on a platform then I was referred to Theodore Travis he recovered the loss and made an extra profit of $3,100
@sergiocourtous5806
@sergiocourtous5806 Жыл бұрын
My first investment with Mr Theodore gave me profit of over $2,000 and ever since then he has never failed to deliver and I can even say he's the most sincere broker I've ever come across.
@jaideepshekhar4621
@jaideepshekhar4621 Жыл бұрын
I don't see how this is cleaner. 1) Why the weird *_var x: f32_* syntax? What is wrong with *_f32 x_* and how is the above cleaner than the below? 2) Why the fn declarator for functions? What does it achieve? 3) Why the weird *_fn add_nums(...) -> f32 { ... }_*? What is wrong with *_f32 add_nums(...) { ... }_*? 4) Why the *_Slice (Circle)_* in function argument and not in *_for_* loop? That seems inconsistent to me. 5) Why the FUCK would you have the *_Print_* function capitalised? That is seriously weird. Unless it is a class, which is even weirder. Edit: It appears it is a convention to uppercase function names. WHY? Edit 2: Because they are supposed to be static. And dynamic names like variables are supposed to be lower_case. Can't agree with that. 6) WHY do you have to use string placeholders like *_Print("{0}", x)_* when you already have *_std::cout
@theophilus494
@theophilus494 Жыл бұрын
Now I'm confused with the question 😂
@axisaligned9799
@axisaligned9799 Жыл бұрын
They want to be more like rust. C++‘s current syntax is so dogshit they copying rust
@DotcomL
@DotcomL Жыл бұрын
For some of the questions, the answer is that it's better for the grammar to be unambiguous. Forward declaring what you're doing with var, let, fn, etc helps on that. std::cout ... Many reasons, but read up on std::format and its advantages.
@DotcomL
@DotcomL Жыл бұрын
Curious about const vs let though, haven't found the reasoning for that yet
@nvmcomrade
@nvmcomrade Жыл бұрын
I hate these hyper abbreviated keywords - fn for function and also primitive types i32 u16 etc.
@techpriest4787
@techpriest4787 Жыл бұрын
But if Carbon can not do better C++ interop than Rust. Then it is another Rust. Except that Rust at this point is far ahead of Carbon. In other words: People need to stop viewing Rust as a replacement for C only. I did not replace C. I replaced my C#/F# code. GLSL and HLSL is next.
@Robert-zc8hr
@Robert-zc8hr Жыл бұрын
Meh, I'm not liking the language very much: - Do we have null safety? I'm assuming we don't. - Why do we need to put auto if we're doing duck typing anyway? If you want to copy TypeScript syntax do so properly. - Why the heck do language designers insist in making functions start with an uppercase letter and variables lowerscase? Functions calls can easily be distingished by the (), and when they're being passed around they are just like another variable so they shouldn't use a diferent naming convention. - Touching on naming conventions, why the heck have we inherited inconsistencies from C? If types are supposed to be PascalCase then i32 should be I32. - Touching on inheritance, I don't see it. I mean, is not in the video, does the language support it and how? Is it intentional to not support it? - What about function overloads? - Why a "dot" on the key of an object literal? Unless they have a very solid reason to go against a JSON compatible syntax, they should just use that. - How do we do varargs, spread operator? - What about testing and documentation? - Can we for once agree on a style instead of using linter tools?
@xarcaz
@xarcaz Жыл бұрын
Eh, Carbon's not going to matter much outside of Google.
@joshb7415
@joshb7415 Жыл бұрын
seems cool, kinda ugly but nicer than c++
@gilneyn.mathias1134
@gilneyn.mathias1134 Жыл бұрын
"let" for const variables? Ok, i'm out.
Astro Crash Course
1:35:19
Traversy Media
Рет қаралды 150 М.
Thx for 54M ❤️
00:17
Younes Zarou
Рет қаралды 47 МЛН
10 칼로리 토스트
00:33
먹스나Muk Sna
Рет қаралды 81 МЛН
Carbon Language - Who is it even for?
17:36
gingerBill
Рет қаралды 27 М.
Object Oriented Programming (OOP) in Python
46:37
Traversy Media
Рет қаралды 272 М.
Carbon Lang… The C++ killer?
3:27
Fireship
Рет қаралды 853 М.
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,2 МЛН
Paid Zig Stream
3:20:37
Tsoding Daily
Рет қаралды 78 М.
React Crash Course 2024
3:04:36
Traversy Media
Рет қаралды 83 М.
Alpine.js Crash Course
42:02
Traversy Media
Рет қаралды 110 М.
Я выбираю себе новую телефон
0:11
Артём и пикачу
Рет қаралды 3,6 МЛН
Оранжевое стекло Remax 🍊
0:40
serg1us
Рет қаралды 820 М.
ЭПОХА МОБИЛОК: WINDOWS MOBILE И PHONE
21:52