No video

Carbon Language - First Impressions from the Creator of the Odin Programming Language

  Рет қаралды 48,634

gingerBill

gingerBill

Күн бұрын

Пікірлер: 201
@AndrewKelley
@AndrewKelley 2 жыл бұрын
19:56 "I cannot name a single platform that supports 128-bit floats natively." I can! ARM 64, RISC-V 64, s390x, MIPS 64, SPARC, PowerPC
@GingerGames
@GingerGames 2 жыл бұрын
I stand corrected, thank you. As for RISC V, is there a chip with that on yet?-because I thought it was just an extension feature. I knew s390x did but I never really think of that system to be used outside specific mainframes. No modern SPARC machine has f128 support as of 2004. What are the instructions on ARM64 for the f128 arithmetic?
@AndrewKelley
@AndrewKelley 2 жыл бұрын
@@GingerGames I sent a thoughtful reply to this but I think youtube blocked it because it contained a link to arm documentation
@DarenC
@DarenC 2 жыл бұрын
I haven't used C++ since 1998 and have mostly been writing PHP scripts for the past 20+ years; Carbon isn't something I'm likely to find any use for. But I watched this after seeing the CppNorth Carbon intro video, and it was fascinating. I'm always in awe listening to someone who obviously understands computer languages and programming on a much deeper level than I do even after more than 3 decades of programming in various languages (Fortran, C, C++, Smalltalk and Pascal for example). Thanks for 90 minutes of geeky entertainment! :D
@dorbie
@dorbie Жыл бұрын
My condolences.
@Muskar2
@Muskar2 11 ай бұрын
PHP for 20+ years? Sounds rough, but I hope you've found a way to enjoy it. I did C#, JS, SQL and web frameworks for 10 years and I was pretty disengaged after the first few years. It wasn't until last year when I rediscovered my love for programming through how much simpler and understandable low-level programming is - I had always wrongly assumed it was futile and less productive. There's less help from others, sure, but when you get familiar with the basic debugging tools like reading disassembly, performance profiling, circular buffers, memory arenas, thread job queues, rigid-to-unsettled architecture layering, low-level programming is much easier (in larger projects) than confusing web stuff tbh. It's mostly the unnecessarily complicated graphics API's that suck, but at least they barely change (one can dream of a day where each GPU vendor makes their own direct API instead).
@wilmerwalton5089
@wilmerwalton5089 2 жыл бұрын
Thank you for a fair evaluation of Carbon, and comparison with Odin. I'm motivated to invest in a further evaluation of Odin.
@umitekmekci503
@umitekmekci503 2 жыл бұрын
I find Odin more productive than other alternatives and also its syntax is memorable. I wish in the future we can write concurrent programs in Odin as easy as Golang
@torarinvik4920
@torarinvik4920 2 жыл бұрын
I took a look at the Odin code on the repository and I am really impressed by the flexible and intuitive ways of iterating through arrays. It's often awkward in these sort of languages. The walrus operator is better for assignment too imo, let equals sign be equals. Odin looks pretty promising. There is another language in the alpha stage Peregrine, it's a statically typed python made to be easy without any loss of performance. It looks promising too. But I think it will be mostly used by python programmers if it ever reaches 1.0 All in all kudos to the creator of Odin, he has done a great job so far.
@londerson
@londerson 2 жыл бұрын
Anything that Ginger says about a new language that claims the replacement of C++ is worthy of attention.
@DerDoMeN
@DerDoMeN 9 ай бұрын
I'd beg to differ... I've managed to come to "reasoning why auto as a return type is bad" part for now and it's getting harder and harder to go and waste time with researching Odin deeper. Both Chandler and this guy have the same issue: they are smart but their ego is far greater than their knowledge so I'd ban both from going even near a keyboard. And that's how you get so many new languages that are more or less a one trick pony that don't warrant a new language but "it's too hard to extend something that already exists" (which wouldn't be a problem if such experimental lab languages wouldn't get so much praise from random people that they become a muddy-the-watter-headache). So in the end this video is quite nice to show two languages for which I don't see any use at the same time... But yeah... For Odin I still have to look at to form an opinion which will perhaps be positive (for Carbon that ship has sailed almost a year ago when I last looked at it). But hey... To each their own...
@jackmordaunt5410
@jackmordaunt5410 8 күн бұрын
@@DerDoMeN thanks for being the arbiter of what I should pay attention to 😂
@DerDoMeN
@DerDoMeN 8 күн бұрын
@@jackmordaunt5410 Like I said - to each their own :) Maybe there's some random Java worshiper here that would disagree that Java made more damage than sensible moves due to it's existence :) But since our programming thought patterns differ, it's possible that the new languages are the next best thing since sliced bread :D Tough luck that they came a bit late and just cause more damage with field fragmentation than they do good but hey... At least some people get salaries while working on their should-still-be-private-due-to-immaturity-and-one-little-difference-compared-to-others hobby project ;)
@MichaelRoachDavid
@MichaelRoachDavid 2 жыл бұрын
Never heard of Odin language till now. Will check it out. Enjoyed the over view of Carbon Language. I'm definitely excited over the potential of Carbon Language.
@cyanmargh
@cyanmargh 2 жыл бұрын
In this case, I recommend that you also consider the jai language. He looks pretty interesting too.
@GingerGames
@GingerGames 2 жыл бұрын
First.
@davidcauchi
@davidcauchi 2 жыл бұрын
nice
@nexovec
@nexovec 2 жыл бұрын
oh shoot
@_slier
@_slier 2 жыл бұрын
recursion
@regbot4432
@regbot4432 2 жыл бұрын
Wtf literally today I tried to find some reliable info about carbon and here you are!
@cemgecgel4284
@cemgecgel4284 2 жыл бұрын
This was very interesting, thanks for the video! I decided to check out Odin after seeing `.xy`. I'm currently creating a C transpiler for the language I have in mind. I did switch back and forth between C and C++ more than 6 times. For lack of generic programming and namespaces in C, and templates and concepts just not working with const qualified types in C++. I might just write it in Odin!
@fyndor
@fyndor Жыл бұрын
I am implementing and this video is super useful. I love hearing your thoughts on various programming constructs, and why some might be better than others. Super useful as I try and discover the best syntax for my language.
@opsis2k
@opsis2k Жыл бұрын
Found this after the CppNorth talks. My only previous awareness of Odin was from Andrew Kelly's shoutout at Handmade Seattle, and I'm glad I sat through this. The CppNorth's presenters' academic hand-ringing pale in comparison to Bill's tactical experience from developing a production language. For him, languages are a tool. For them, they disagree with the previous committee, so they're forming their own. Wonder what kind of design decisions they'll come to? Last 30 minutes were the best.
@bunnybabu1162
@bunnybabu1162 2 жыл бұрын
I read a tweet and immediately searched in youtube to get broader aspect and found your video. Maybe I should start following your channel to get more latest info
@sdhetan3hetsa
@sdhetan3hetsa 2 жыл бұрын
very glad i found this video and learned that Odin language exists. Looks like Odin is my type of language. Using C atm.
@AdmiralJonB
@AdmiralJonB Жыл бұрын
I was around in the initial stages of Odin, although forgot about it as I discovered Rust. I'm sure I was subscribed to this channel at one point but apparently not anymore. Then this video popped up, and think I might have a look again! Good impressions video! Very informative.
@neilclay5835
@neilclay5835 2 жыл бұрын
Thanks that was very informative.
@Nenad_bZmaj
@Nenad_bZmaj 6 ай бұрын
I watched the video to hear something about this Carbon language, but instead I realized that Odin is fantastic for my purposes, and in general. I am currently using Go and I like it. (I am not a programmer, but a scientist who wants to make custom tools for my projects, that's why I am using programming, but I also wanted to know a highly performant, safetype, general purpose, non-OOP language, easy to learn, and so I chose Go over Julia or Python) Now, with Odin, I don't need to write my own matrix package in Go (although I've written quite a bit of it already) . So nice to have it built into the language itself. Element-wise operations on arrays are a candy :D Q: How would you rate Odin's performance compared to Go on one hand, and Rust, on the other?
@alexitosworld
@alexitosworld 2 жыл бұрын
Very interesting! Thanks for sharing. I will stay with Swift :p and when it has c++ support gg.
@tortoise74
@tortoise74 2 жыл бұрын
I like the way you've done the language comparison here. Obviously this was prompted by the announcement of Carbon but do you think you might do similar style comparisons vs any other languages, for example Nim?
@TheSulross
@TheSulross 2 жыл бұрын
Zig is the one new language that garners a lot of attention (as replacement for C), but another fascinating indie language is Vale
@varomix
@varomix 2 жыл бұрын
great overview of BOTH languages, is great that something is happening in the C++ world, I'm NOT excited about C++ 20 or 22 or 25, but this could be a good direction, hopefully they make it SIMPLER and not Rust like, in the mean time, I'm enjoying Odin and will be for a while, thanks Bill
@joshhoover1202
@joshhoover1202 2 жыл бұрын
Seeing as it is c++23 and not c++22 it would seem that you indeed do not care about c++.
@varomix
@varomix 2 жыл бұрын
@@joshhoover1202 you got that right, why would I care about something 4 to 5 years from now, 20 is not even released yet, 23 would be what? 2026, 2027? :D
@joshhoover1202
@joshhoover1202 2 жыл бұрын
@@varomix 20 is released and 23 is effectively completed. I have spent most of the day writing code that is uses things from 23 and is compiled with the c++23 standard flag.
@varomix
@varomix 2 жыл бұрын
@@joshhoover1202 that's great, still that fixes none of the issues with memory handling, RAII, rule of five, is just too much baggage, maybe you are good with that, I am not and clearly, since they are making an alternative, other people aren't
@brendanhansknecht4650
@brendanhansknecht4650 2 жыл бұрын
I apparently really need to look into Odin. It looks like it may fit a niche I am really interested in. So far, c++ (c-style-ish) is the language I regularly fall back to despite extensive rust programming experience. I also think zig is nice, but it just doesn't satisfy me.
@shmuelisrl
@shmuelisrl 2 жыл бұрын
it's nice to see my art side and love, and my technical programming interests side touch on youtube ( this makes sense but doesn't happen that often). EmberGen is a really impressive software although I don't use it myself (yet)
@kcvinu
@kcvinu Ай бұрын
It's been one year. but I can see the brilliant idea of marketing after watching the first 3 minutes.
@julkiewicz
@julkiewicz Жыл бұрын
15:10 I would guess the arbitrarily sized integers can help a lot with efficient serialization and networking code. You can do bit masks, bit fields etc. but I could see how this is more error-prone and painful than just having fields packed like that into types that can be reused in different places. Something like that can be (with some extra effort) handled by the compiler that is generally great for accounting tasks like that. At the same time it would take an enormous effort to handle this with a generic library. It would probably even require some insane features in the generics to make it possible to handle by a library. Yes it doesn't map to set of opcodes, registers on the CPU, but it does map to actual bits in a message sent over the net or stored to disk. As for 256-sized types, I would guess it's something that's useful for cryptography?
@kaiko2020
@kaiko2020 2 жыл бұрын
I actually like the Swift-but-C++ approach, but it's sad they got things like namespaces and visibility wrong. Also, why name it 'choice' when you can name it 'enum' and get familiarity? I hope the language will be heavily updated in the future. It has great potential, but right now the execution is terrible...
@nickskywalker2568
@nickskywalker2568 2 жыл бұрын
I have similar thoughts on Go
@mistersushirod
@mistersushirod Жыл бұрын
FU ME! An interface inside the class! This is amazing. I mean, nothing exactly new but the way it's implemented is very nice.
@flamendless
@flamendless 2 жыл бұрын
I think the cpp committee got tired of improving c++ that they started another one 😂
@ziyadkader6767
@ziyadkader6767 2 жыл бұрын
I didn't see you recommend Rust, what's your opinion on it ? great video btw, these comparaison are the one that will get odin to the general public faster .
@ShaunYCheng
@ShaunYCheng 2 жыл бұрын
Nice video. Suggestion: sometimes your webcam overlay covers up the code, maybe may it smaller?
@MurtagBY
@MurtagBY 2 жыл бұрын
Can you point out such fragment where you could not pause the video in another place?
@Antonio-yy2ec
@Antonio-yy2ec 2 жыл бұрын
I was hoping to see “defer” in carbon, hope in the future they decide to add it, it solves a ton of problems
@TheSulross
@TheSulross 2 жыл бұрын
i'd like a combination of destructor RAII and defer - the destructor on classes might make it feasible to construct various smart pointers and the later will be for arbitrary resource cleanup where don't want the fuss and boiler plate overhead of devsing a destructor-based class clean up of said resource
@venkateswarans1012
@venkateswarans1012 2 жыл бұрын
We need some language similar to what Kotlin did to Java... You can literally write java code Inside Kotlin and use all it's lib. Rust is doing great but when I try to use some c/c++ lib it's really hard to bind. There are ton of C++ lib already exist and it's impossible rewrite everything in Rust or Zig or Golang or any other ..
@lubricustheslippery5028
@lubricustheslippery5028 2 жыл бұрын
If the type system is bad in C then you have to make sacrifices and inherit problems from C and C++. Some of the problems in C++ is because it was compatible with C.
@sdsdfdu4437
@sdsdfdu4437 2 жыл бұрын
Zig has great interop with C
@PetrGladkikh
@PetrGladkikh 7 ай бұрын
14:30 Arbitrary bit-width integers are useful for serialization, working with binary formats, or in situations where compact in-memory representation is more important than performance. Whether they map nicely to hardware is not really relevant.
@GingerGames
@GingerGames 7 ай бұрын
It is relevent, but I am also not a huge fan of them in general. They are a viral type (in that they "infect" everything). It is never "just" adding a feature to a language, and arbitrary bit width integers are one of those pesky things people don't realize become a problem until later on.
@robgrainger5314
@robgrainger5314 2 жыл бұрын
RISC V has extensions for 128-bit float support, and its implemented on some IBM architectures for mainframes and minicomputers.
@GingerGames
@GingerGames 2 жыл бұрын
Is there a single RISC V machine that physically exists with 128-bit float support? As for the IBM stuff, I've never personally used onr and it's not really a high priority for us yet in Odin. BUT if people want it, we can try and support it! But if the only machines that support 128-bit floats _natively_ and _exist_ are IBM, old PowerPCs, VERY old SPARC (20+ year old), and some rare MIPs, then it is safe to assume that it's not really a good idea to have it as a core language feature in my opinion.
@robgrainger5314
@robgrainger5314 2 жыл бұрын
@@GingerGames I'm uncertain whether those extensions are used, and I tend to agree that support for IBM's big iron is out of scope for most languages. With its current rarity, it certainly shouldn't be priority, but it may be worth exercising care not to exclude it.
@KeyT3ch
@KeyT3ch 4 ай бұрын
Would love to see your comparison on cpp2/cppfront as well
@awesomedavid2012
@awesomedavid2012 6 ай бұрын
I love the "type on the left, usage on the right", but is there a reason why varargs are done only on the left? For example, with print :: proc(args: ..any) --- arr := []int{1, 2, 3} print(..arr) is it simply easier to parse, or what's the reason?
@GingerGames
@GingerGames 6 ай бұрын
There a few reasons for this: variadic parameters are not a type, so the rule isn't broken. It's clearer when it's in front than at the end. It prevents common mistakes with people trying to use .. as a range (only ..< and ..= is valid). It's common to do that in other languages (i.e. familiarity).
@pushqrdx
@pushqrdx 2 жыл бұрын
Can i please know what font and colorscheme are you using? they look so easy on the eyes for me
@sir_no_name1478
@sir_no_name1478 5 ай бұрын
Nice thanks for your comments. May I ask a question about thr designt choice of the for loop? I like that there is only one loop type, but I wonder why you did not use "foreach" for the "for in" loop and the normal "for int i..." loop for the rest. (So many for xD)
@greyfade
@greyfade 2 жыл бұрын
It seems RISC-V and System/390 both have hardware extensions for 128-bit float. The former in specification, and the latter in actual hardware.
@TankorSmash
@TankorSmash Жыл бұрын
For the Odin switch statement, you mentioned you would only have the two states and leave the nil being handled by 'case:'. Is that because nil is a possible value for any variable, or being the union was optional?
@krystofjakubek9376
@krystofjakubek9376 2 жыл бұрын
Hey Bill could you go into more depth on the tuple vs multiple parameters subject? You mentioned this several times in the past but I cant remember if you actually explained what the difference is. If theres some video where you discuss this let me know.
@GingerGames
@GingerGames 2 жыл бұрын
I have an article on my website (gingerbill then a dot then an org) titled "Multiple Return Values Research" on the topic.
@superscatboy
@superscatboy Жыл бұрын
Could the 256-bit ints and 128-bit floats be an attempt at future-proofing?
@GingerGames
@GingerGames Жыл бұрын
Name a machine today in common use that supports either of those natively. So any "future-proofing" makes little sense, especially since adding the constructs would be easier to do when actually needed and supported by hardware natively.
@superscatboy
@superscatboy Жыл бұрын
@@GingerGames Please don't get me wrong - I'm not trying to defend it. I'm just trying to figure out what the motivation for those types is, and wondering if maybe that's what they're trying to do by putting them in there. I completely agree that it's all very strange.
@GingerGames
@GingerGames Жыл бұрын
@@superscatboy I understand you were not trying to defend it. I just don't understand the rationale either.
@kuhluhOG
@kuhluhOG 3 ай бұрын
​@GingerGames maybe it for implementing cryptographic stuff easier, since they often deal with 256bits? Or maybe they already deal with SIMD internally anyway and chose to expose it for some reason. But yeah, it's weird. My last guess would be that they got scared at the state of IPv6 (because the lack of a 128bit Integer is imo one of the reason why we today are in this dual mess) and want to make REALLY sure to prevent something similar. Aka, programmer ptsd. But I know some machines with 128bit floats.
@Monotoba
@Monotoba 2 жыл бұрын
I would love to see a few tutorials projects. Specifically, using C/C++ libraries with Odin. Perhaps a GUI package.
@cold_ultra
@cold_ultra 2 жыл бұрын
First carbon video on YT?
@SimGunther
@SimGunther 2 жыл бұрын
Rene must've had a video on Carbon today as well
@Sancarn
@Sancarn 2 жыл бұрын
About 128-bit floats: GPU acceleration using 128 bit floats is an area of research at the moment I believe.
@yeongjukang7300
@yeongjukang7300 2 жыл бұрын
thanks! what i wanted to ask you is here. 5:20
@purpinkn
@purpinkn Жыл бұрын
its google. who cares? they'll just abandon it anyway.
@chengcao418
@chengcao418 2 жыл бұрын
slight mistake here 20:09, RISC-V has the quad float extension defined. There isn't a hardware implementation out there but the specs are there
@GingerGames
@GingerGames 2 жыл бұрын
That's not a mistake, that's exactly what I mean. No RISC-V machine has 128 bit floats.
@chengcao418
@chengcao418 2 жыл бұрын
@@GingerGames But the argument here is that the specs exist, if some weirdo super computer decided to do it, they have it supported within spec
@GingerGames
@GingerGames 2 жыл бұрын
@@chengcao418 I don't actually care about potential chips, but actual chips. And in practice, I doubt it will be widely implemented because it's probably not that useful in practice. And even if a RISC-V chip exists, as I was corrected in the comments by other people, other than z390 or archaic MIPS and SPARC chips, there are no native 128-bit floating point chip support .
@SimGunther
@SimGunther 2 жыл бұрын
Sounds like another incremental "improvement" of an existing language instead of a genuine innovation that actually solves a problem WELL. Not trying to sound ungrateful for the load of other languages that have been made over the last 10+ years, but this is just a trend I've noticed. Soon enough, there's gonna be an Odin clone because some team got tired of the "problems" they saw in the language, so they made a new language with more tangible issues than the original language it was based on.
@GingerGames
@GingerGames 2 жыл бұрын
And I would welcome people making their own languages to a certain extent. Odin isn't a incremental improvement on C or C++ though, and is quite radically different in many ways, especially its philosophy. It's solving real problems that other languages struggle to or even cannot even do.
@SimGunther
@SimGunther 2 жыл бұрын
@@GingerGames And that radical innovation in Odin is simply awesome! Thank you very much for your wonderful contributions to the programming language culture. Truly a wholesome inspiration for PL designers everywhere.
@dandymcgee
@dandymcgee 2 жыл бұрын
I definitely prefer that people either make incremental improvements to the existing thing, or make substantially useful and new changes to a new thing, rather than making a new thing that has very small incremental improvements. That said, this is often impossible because "improvement" is extremely subjective and most projects will veto many "obvious improvements" for a number of important reasons (maintainability, compatibility, core values, etc.) as well as unimportant reasons (arbitrary beliefs, unfounded opinions, they just don't feel like it, etc.)
@SimGunther
@SimGunther 2 жыл бұрын
@@dandymcgee Case in point for that solid insight, "obvious" improvements like the KAIL Selector from 1975 were not in industry because it strayed too far away from common convention. Who'd want to rework all the language syntax just to retrofit something wacky yet awesome like that?
@LaPingvino
@LaPingvino 2 жыл бұрын
the design goal for Carbon is to capture the group of projects that cannot feasibly move to Go, Rust etc., so that explains a lot of the decisions they make or are going to make.
@skyeplus
@skyeplus 2 жыл бұрын
I like seing cross polination and convergent evolution.
@_hawk_8681
@_hawk_8681 2 жыл бұрын
As a hacker's prospective, is socket programming possible in carbon. And some low level memory manipulation.?
@andreffrosa
@andreffrosa 2 ай бұрын
Why is Odin so similar to Jai? Can you make a video like this one with the comparison of the two?
@GingerGames
@GingerGames 2 ай бұрын
Other than the declaration syntax and a few minor things, they are quite different languages. You can search for Odi vs Jai for a quick overview, or ask someone who has used both. You'll find out quick they are not the same.
@Lircking
@Lircking 9 ай бұрын
i don't know know if having built in matrix types and maps makes your language better it's all about the building blocks. Carbon will go much further than Odin in the long run.
@mariobroselli3642
@mariobroselli3642 5 ай бұрын
It is surprising that people are already hiring for Carbon and it looks like it is not what it seems. Is it like Typenscript after they Made C#?
@10bokaj
@10bokaj Жыл бұрын
I don't get why Odin has slices, it seems like a convelutet way to have an array, and in the few hours i have used it, i had problem converting from/to dynamic array and slices. Why not just have constant size arrays and dynamic arrays?
@GingerGames
@GingerGames Жыл бұрын
Slices a runtime _view_ into an "array" which may or may not be allocated dynamically nor be able to append to. This is why there are distinctions between the arrays in Odin. If you only had constant sized arrays or dynamic arrays, you would not be able to write much generic code efficiently when the length of the array is only known at compile time and when you do not need to copy the memory all the time.
@luz_reyes_676
@luz_reyes_676 2 жыл бұрын
What do you think of 'Bits Inside Rene' s (KZbin) opinion? To vaguely summarize, he says 'dont reinvent the wheel'. That Google should have spent the resources fixing C++ or supporting Rust development. Unfortunately, he did not give much feedback on the language itself, like you did.
@GingerGames
@GingerGames 2 жыл бұрын
I comment on his video in my latest video on the Carbon Language.
@thygrrr
@thygrrr 9 ай бұрын
128 bit floats are great for low throughput but high precision calculations. And they will come to hardware sooner or later.
@GingerGames
@GingerGames 9 ай бұрын
This might sound like a silly rhetorical question but why would you not just go for big floats at that point if you need even more precision? And I have high doubts any mainstream hardware will support it any time soon.
@Jonasmelonas
@Jonasmelonas Жыл бұрын
"^" is such a better pointer character than "*"
@11folders
@11folders 2 жыл бұрын
Is there an ELI5 of the difference between Go and Carbon?
@_slier
@_slier 2 жыл бұрын
go is for stupid programmer - author of golang .. golang is one lousy language in existence
@izenhow4775
@izenhow4775 2 жыл бұрын
So what about Go ???? Why don't replace C++ with Go
@GingerGames
@GingerGames 2 жыл бұрын
If you need manual memory management, Go is not an option.
@_slier
@_slier 2 жыл бұрын
i laugh everytime i see golang.. poor souls
@izenhow4775
@izenhow4775 2 жыл бұрын
@@_slier is Golang bad???
@GmanGavin1
@GmanGavin1 2 жыл бұрын
As someone with no experience with C and C++ my reasoning was “Jee, there has to be something new by now” and “why would they name it Rust (ewww)”
@beedeeuniko
@beedeeuniko 6 ай бұрын
Odin commercial yay
@abrahamvivas9540
@abrahamvivas9540 2 жыл бұрын
Is just Haskell permeating drop by drop on every mainstream language...
@GingerGames
@GingerGames 2 жыл бұрын
Not Odin really. Odin is heavily influenced by the Pascal/Modula/Oberon/Go family. It has very little, if any, influence from any functional language.
@josephlagrange9531
@josephlagrange9531 2 жыл бұрын
Dude, are your commentators below Odin promoters?
@0__alfie__0
@0__alfie__0 2 жыл бұрын
I like the look of it but why does Google keep making more and more programming languages lol
@GingerGames
@GingerGames 2 жыл бұрын
It's non-related teams making different tools for their own personal needs. The more languages the better. There doesn't need to be a single language to rule over everything.
@oliveryt7168
@oliveryt7168 2 жыл бұрын
Thank God for Kotlin though..
@michaelmoran9020
@michaelmoran9020 Жыл бұрын
I understand it's your project and the easiest point of comparison for you, but I felt like you talked about Odin way too much here. Something I'm unfamiliar with being compared with something else I'm unfamiliar isn't very helpful, especially when this is meant to be a c++ replacement.
@jojje3000-1
@jojje3000-1 Жыл бұрын
We also have cpp2, Herb Sutters new syntax for c++. This is a strong competitor bkz of the bwc to all old c++
@LOLLOL-gg8jc
@LOLLOL-gg8jc 2 жыл бұрын
I dont like c. But here's the thing, I am very productive in it. I think the reason is because c is minimalistic and simple. Comparing c to odin, odin has way too many types, selective data structures built into the kernel, etc... Carbon on the other hand, is simple and minimilistic. Whats your take?
@igorfagundes2177
@igorfagundes2177 2 жыл бұрын
I use odin for several months and for me is much simplier than C for many cases. Sane slices sintax, array operations for default. I found Odin with lower friction than C, much lower. And the sintax is very simple and clean.
@igorfagundes2177
@igorfagundes2177 2 жыл бұрын
I have the impression that Carbon tends to Zig side of the force (high verbosity, very structured, syntax and types very explicity (semicolons, parentesis)). I also worked with Zig for some time and I found harder to use than C
@joshuadonahue5871
@joshuadonahue5871 2 жыл бұрын
When you say "selective data structures built into the kernel" do you mean the standard dynamic array, hash table, slices, and tagged unions? AFAIK those are the only "built in" data structures (meaning they have custom syntax), which really isnt they much, and you'd end up wanted to implement some version of them anyway. Everything else is standard library, which could be used or discarded. I've found Odin to feel more productive than C for me, it has fewer gotchas and a more expressive type system. I'm also afraid that maintaining comparability with C++ will keep Carbon from ever being minimalistic and simple, but time will tell. It feels like a step in the right direction, at any rate
@user-ov5nd1fb7s
@user-ov5nd1fb7s Жыл бұрын
Since when writing performant code in Rust is unsafe? You write unsafe to express some invariant that the compiler doesn't/can't know. It has nothing to do with performance. Rust, without unsafe, is as fast as anything out there.
@androth1502
@androth1502 2 жыл бұрын
having interop with c++ is a fantastic idea to upgrade a language to a better, modern language. this is the main benefit of Zig which gives a significant improvement over C and the interop makes it an ideal choice to have source-level access to all your C code while writing in a significantly better language going forward. carbon in my opinion does not seem to be a significant improvement over C++. it doesn't seem to me to be any sort of improvement at all. i see no justification for a C++ programmer to switch to it with the idea of having source-level access to all their c++ code.
@askeladden450
@askeladden450 2 жыл бұрын
as an experienced c++ dev, I would happily switch over if they deliver what they promise ->Out of the box package manager (biggest win) ->Massive decrease in complexity (which is present in c++ due to legacy reasons) ->Simpler generics/templates. As someone who works primarily with c++ templates and concepts, carbon's proposal sounds miles more simpler and productive. ->Inheritance that actually makes sense ->better memory and const safety (will have to see how it actually turns out tho) ->Much more friendlier errors ->More readable syntax ->Syntax that's is more consistent with modern languages like rust and typescript Honestly, with the minimal learning curve and being able to use all the c++ libs I love, I see absolutely no reason not to switch over.
@androth1502
@androth1502 2 жыл бұрын
@@askeladden450 if given the option between the two, I would just stay with c++.
@heavymetalmixer91
@heavymetalmixer91 Жыл бұрын
EDIT: I hope the Carbon devs take this video to earn how to improve some aspects of the language. There's potential in this new language, let's not forget it's just v0.1 (like Pre-Alpha levels of early in development) so many things could and WILL change. If this new language does reach the goals google is talking about, several areas in the CS world could see improvements like coding less in time. Taking Game Development as example: Many game devs out there are stuck with one or another language because of the engine they use, and many times the engine uses only C++. If we combine this with how complex game development is, we have very long development times while they also have to keep legacy code because of several reasons like the engine itself being rather old, prior games, old libraries for games, old code that can be reused for specific purposes, etc. If they can keep all the C++ code they already have but they start using a language that is easier to understand and allows for faster coding, then the devs could meet the deadlines more easily and to deliver less buggy games. This could also result in devs being less overworked ('cause we all know game devs work like slaves) but it would depend on the company.
@jakobpovsic5504
@jakobpovsic5504 2 жыл бұрын
This rant about undefined behavior is a straman argument, the spec clearly states that in performance builds, there are no overflow checks to minimize the overhead, in development & hardened builds the overflow checks are the default behavior. As for this being "only exists in c++", is just plainly wrong, any lang can have overflow errors...
@GingerGames
@GingerGames 2 жыл бұрын
Having undefined behaviour in performance builds is still the existence of UB. And overflowing of arithmetic can be well defined, but that behaviour could be a logical error in the code itself rather than operational behaviour which is undefined.
@jakobpovsic5504
@jakobpovsic5504 2 жыл бұрын
@@GingerGames does defining this behaviour so that it results in an error incur any overhead?
@GingerGames
@GingerGames 2 жыл бұрын
@@jakobpovsic5504 overhead compared to what? Because if you are checking the for the error of an overflow, then that's a branch on very check, which is a huge overhead compared to not having a check and assuming 2's complement behaviour.
@skaruts
@skaruts 2 жыл бұрын
When I see everything Capitalized in a language, I just tune out, tbh... I like syntax that flows through my fingers, and doesn't require me to press shift a million extra times. And then you have functions syntax-highlighted in the exact same color and casing as class constructor calls. PascalCase/camelCase are harder to read and harder to write, and have zero advantages. Somehow they still became a massive trend...
@nikoladd
@nikoladd 2 жыл бұрын
It's a carbon copy of some of the lesser features of Rust. ..which to be fair is good idea, as most "C++ programmers", i.e. the people that call themselves that, are too dumb for the more advanced ones anyway. So it's a win-win. Good pitch for Odin though. I literally knew nothing of Odin and now after watching the video I have some basic understanding why I might want to use it instead of Rust or Zig in some cases. Native complex calculus and operational math primitives do come handy from time to time. I do like some of the Pascal like syntax readability.
@flyLeonardofly
@flyLeonardofly Жыл бұрын
1:26:00 hahahahaha, what what what???
@hanyanglee9018
@hanyanglee9018 2 жыл бұрын
Let put the Edit first: I have no idea what are these 2 languages, so this could be quite fair. Only according to this video, Odin is quite math and computational, while Carbon is quite glue and giant project friendly. They are designed in totally different purposes. Also, I disagree with what you said about the a.xyz * b.yzx. Carbon shares some philosophy with c++, and this feature should be done with std library rather than language feature. In fact c++ consists of 2 major parts, the built-in language features and the std library. They are both specified in specifications. Carbon probably does this with std library if it really does this in the future. By the way, c++ has complex in its std library which people rarely know about. I agree with you about the complexity. Complexity is really a harmful side production of all the features people want. About the impl. This is probably only for the built-in functions which can be called with +, -, ->,
@GingerGames
@GingerGames 2 жыл бұрын
You CANNOT implement swizzling at the user-level, it must be a language level feature for it to even work correctly. You are forgetting stuff like this `v.yxz = ...` having to work correctly too for all cases. As for my comment on `namespace`, C++ namespaces are a hack and a proper package system (like Odin or Go etc) are much better choices. I can understand they are supporting the C++ way because they need to be ABI compatible but otherwise, it is a worse approach. And regarding the constraints, if you need such a complex system to do all of those constraints, you might have other problems which need solving first since you shouldn't require many constraints in the first place. The && thing I mentioned was JUST a minor thing about error reporting of a short circuiting expression, or at least trivial reporting.
@hanyanglee9018
@hanyanglee9018 2 жыл бұрын
@@GingerGames With c++ philosophy, the swizzling should be done like: c = std::mul_xyz_yzx(a, b); But the problem is not about how to implement it, it's about this is not what c++ is for. Since you mentioned, Odin has built-in max, min functions, and also a lot math features. C++ doesn't, because it's not what c++ is for. About the constrains, this feature probably helps well for the library devs but helps only a bit for most of us. So, the example is only to show my idea. Odin probably doesn't need it. It's based on the c++ philosophy.
@GingerGames
@GingerGames 2 жыл бұрын
@@hanyanglee9018 Odin isn't oriented around math and computation, surprisingly. We are in many ways Game and Application Oriented, as you can tell with EmberGen. But my point was that Odin has features which are better fit than if you just had a generalized operator overloading approach. A general tool can rarely be useful for a specific problem. As you can guess, I am not a huge fan of the "Modern C++" philosophy and the requiring loads of typeclass constraints in general is a sign you have just got a awfully architected code base to begin with.
@hanyanglee9018
@hanyanglee9018 2 жыл бұрын
@@GingerGames Yeah, thanks for the comment. I thought the idea over and over again after I read your comment yesterday and I came up with an idea of, if namespace helps prevent name pollution, then should language feature be limited in scopes? If a.xyz is accepted by the grammar, then all the x, xy, xx, xxx, xxxx, xyz, rgb, are all reserved as keywords, or in some scopes these are occluded by language feature. Just like the name pollution, the std::move from algorithm is occluded by the std::move from utility or some other header. This scope of feature is not mentioned at all, at least I've never heard about it. Idk if this could help with anything.
@GingerGames
@GingerGames 2 жыл бұрын
@@hanyanglee9018 They are NOT keywords in Odin nor do they need to be. The swizzling shorthand syntax is only possible for arrays and simd vectors of length
@liminal6823
@liminal6823 2 жыл бұрын
Every 9 years they come out with a new language to replace C and C++. OK, see you in 2031! 👋🏻
@elguapo3436
@elguapo3436 2 жыл бұрын
This is the golden comment I was looking for... It'll be Carbon free 2031 !
@juscelino2253
@juscelino2253 2 жыл бұрын
lmao
@saeed6296
@saeed6296 2 жыл бұрын
why the ugly syntax 😒
@captainfordo1
@captainfordo1 4 ай бұрын
Odin is definitely better :D
@Phantom-lr6cs
@Phantom-lr6cs 4 ай бұрын
i don't think so cuz indentation craps and that kind of things programmers hate . cuz we need to measure it everywhere which is boring and annoying as f
@user-ft6zh8ny9i
@user-ft6zh8ny9i 2 жыл бұрын
As for me, i think carbon looks like garbage. No need to make it harder than C language.
@_slier
@_slier 2 жыл бұрын
just hoping it will not be kill like any other google project
@DimiterStanev
@DimiterStanev 2 жыл бұрын
I liked it until he started talk how slow this is. Which might be the case, but it wasn't show how was this compiled to begin with. Seems like he should've skipped this bit.
@krystofjakubek9376
@krystofjakubek9376 2 жыл бұрын
No matter how its compiled any hello world program should not take 3 minutes. It just shouldnt and if theres so much code that needs to be compiled for it to take 3 minutes than the standard library implementation is very bad
@DimiterStanev
@DimiterStanev 2 жыл бұрын
@@krystofjakubek9376 I think it's premature to base any findings on this still yet an "experiment" - I doubt the effort would be to create a slow compiler.
@krystofjakubek9376
@krystofjakubek9376 2 жыл бұрын
@@DimiterStanev yes thats valid point. However at least for me this is quite off-putting
@_slier
@_slier 2 жыл бұрын
not even v0.1 .. what u expect?
@elefteriosstamatogiannakis7024
@elefteriosstamatogiannakis7024 2 жыл бұрын
Regarding constness, unless Odin has solved memory aliasing then const is one of the most important ways to tell the compiler to not read the same thing again and again from memory. You indeed talk about Odin's default const function parameters being an important optimization, but you do not also consider that constness in other places would also similarly help the compiler with optimizations.
@GingerGames
@GingerGames 2 жыл бұрын
`const` in C and C++ offers virtually no optimization benefits. What you are talking about is `restrict`, not `const`.
@elefteriosstamatogiannakis7024
@elefteriosstamatogiannakis7024 2 жыл бұрын
@@GingerGames You are right about restrict, it is indeed another way to persuade compilers to optimize memory accesses, but you are not right about const. It works, not great, but it definitely helps the C++ code that i'm working with, *more* than restrict does.
@GingerGames
@GingerGames 2 жыл бұрын
@@elefteriosstamatogiannakis7024 I can literally quote Chandler Carruth if you want. `const` does virtually nothing in terms of optimization because of the ability cast it away at any time.
@elefteriosstamatogiannakis7024
@elefteriosstamatogiannakis7024 2 жыл бұрын
@@GingerGames Interesting, i didn't knew about that person. He does 3d physics, i do too and my experience differs :) (Edit) Delightfully you are right :) . I tested the const behavior of MSVC by removing constness from different (non-function parameters) parts of the BeamNG physics core and for most of the parts there was no performance change apart from one part. In the main computational core, there was a performance *increase* of around 0.5% which is a surprise :) . Thank you for teaching me something :)
@elefteriosstamatogiannakis7024
@elefteriosstamatogiannakis7024 2 жыл бұрын
@Eleanor Bartle While a big % of BeamNG's code base is open source, the physics core is not open.
@KaiHenningsen
@KaiHenningsen 2 жыл бұрын
You do realize that those "strange" struct literals are exactly C/C++ syntax, so something people going from there to Carbon don't have to re-learn, right?
@GingerGames
@GingerGames 2 жыл бұрын
I do realize this very well, but it also misunderstands why they are written that way to begin with in C and C++. It has to be `{.x = 123}` in C and C++ because `x = 123` is an expression. But because the rest of the syntax in Carbon is different enough from C++, stating making it easier to transition is a moot point. And I was also criticizing the inline struct (not class) syntax too which differs between the literals with a colon and an equals. e.g. defining a struct type using this syntax `{.name: String, .count: i32}` rather than something like struct{name: String, count: i32}` which would be more intuitive, but maybe they are trying to make structs pseudo-POD whilst `class` can have all the fancy stuff.
@vladimirkraus1438
@vladimirkraus1438 2 жыл бұрын
I do not think that such a rough critique of Carbon is fair at this moment. The language has just been announced and none of its features or syntax is final, now it is just an early concept. Slow compilation is something that can be vastly optimized in the future (and can be expected to be much faster than C++). In my opinion such a language is highly needed. There is so much code written in C++ and Carbon can give it a new life... Nobody will rewrite everything to Rust, Zig or Odin. There are so many developers who can choose only to stay with antique C++ or hope for something like Carbon.
@GingerGames
@GingerGames 2 жыл бұрын
Being critical at an early stage means there is a better chance that things can improve for everyone. I have no problems with people being critical with Odin, especially when they have good points! I have also never suggested nor stated that people should rewrite codebases in another language. If that codebase works, keep it. The point about Carbon is that it's clearly meant for the needs of Google where it has MASSIVE C++ codebases where new projects must use the existing C++ code and cannot be written from the start using another language. It's pretty obvious that the creators of Carbon would rather use Rust if they could but they cannot because of this legacy integration problem. I wish for the best for them in their endeavour.
@vladimirkraus1438
@vladimirkraus1438 2 жыл бұрын
@@GingerGames There are many companies which have massive C++ codebases, not just Google. In fact, every company which I have worked in, could vastly benefit from Carbon if the expectations get fulfilled. And there are massive libraries used by many, e.g. Qt, which would be great to be used with a modern language.
@GingerGames
@GingerGames 2 жыл бұрын
@@vladimirkraus1438 Would those companies actually require _bidirectional_ interoperability? I'd argue even those big ones would benefit from just having unidirectional interoperability (when starting new projects), and many languages already support this when dealing with C++ (D is a very old example of this). My worry about Carbon in its current state (which I do keep repeating in this video) is that it's not great and needs a lot of work before I would recommend it to anyone, and I am not talking about the experimental nature of it but the design of the semantics of the language itself. And now that the actual lecture has been released on KZbin (which I might need to do another video on), Chandler Carruth explicitly states that this is just an idea of what a successor to C++ might be. I hope for the best for Carbon, and truly do.
@KaiHenningsen
@KaiHenningsen 2 жыл бұрын
On the hexadecimal floats ... I think they should have picked a hex exponent, too, but I think it is still much more sensible and useful than your 0hxxx notion. The whole idea, at least for Carbon/C/C++, is to have a representation that doesn't lose bits, but is otherwise independent on how the float is actually implemented, and yours seems to be the exact opposite. For example, you can convert a single precision float on one hardware into this hex representation, and assign the result to a double on a different hardware, and you'll get the exact same value. That won't work with your version, which I also find exceptionally cryptic, unless dealing with floating point numbers on the bit level is your daily bread and butter, which describes very, very few developers, I'd estimate.
@GingerGames
@GingerGames 2 жыл бұрын
> independent on how the float is actually implemented That completely misunderstands the entire point of having 0hxxxx float literals. They are extremely useful for writing algoriths that require a SPECIFIC constant for a SPECIFIC sized floating point number. And those low level algorithms (which many programmers may never use, but I do write these) require specific bit layouts which may not be easily represented with the hexadecimal float literal (or comprehended). You NEVER required a C-style hexadecimal float literal for a generic-width float (which is what you are arguing) because you can use a decimal literal to accurately represent the number. As for the representation of floating-point numbers, Odin explicitly requires them to adhere to IEEE-754 (and I bet Carbon does too).
@saeed6296
@saeed6296 2 жыл бұрын
why the fu*k do we have to use fn keyword ?
@radarsmutny8462
@radarsmutny8462 2 жыл бұрын
ya, its equally weird as fun or pub - function and public is okay ... BIASED, as I like java, just java, latest features, on-the-fly compilation/execution of single source with many classes and refs to jar libs folder for simple jdk+fx javafx tools, no build system, javafx gui hello world in a second, everywhere down to raspberry pi, just launch special extension source file :-) (yes, that was my effort to push these things to limits during re-learning java after years elsewhere, mostly c# - net maui isnt ready, javafx is ready and with gluon/graalvm using AOT compilation to native... with harder interop on ios/android then, ya) ... but I am here just peeking for something prettier down to AVR/ARM/RISCV MCUs, having arduino weird c/c++ mixture, not liking rust syntax nor any newage totalitarian code of conduct...
2 жыл бұрын
Seeing Carbon and Odin... I stick with Rust.
@GingerGames
@GingerGames 2 жыл бұрын
Use whatever makes you productive! It's amazing that we as programmers now have a choice in our toolset!
@proudmoroccan8164
@proudmoroccan8164 2 жыл бұрын
I will stick with Rust.
@jinxscript
@jinxscript 2 жыл бұрын
just a selfish act by google as usual lol
@nonetrix3066
@nonetrix3066 2 жыл бұрын
They should stop recreating the wheel; why not just use Rust? However, I hope that some Chromium code is rewritten for better performance or security. I am not too satisfied with the performance of the major browsers, could be better, especially in the rendering department. But it seems, that it's a time for experimentation; people trying new things to see what sticks, and what doesn't. Not really great for developers that just want something they can depend on in a few years that will be still commonly used etc. Also, there's the issue of fragmentation of code bases; for crying out loud, just looking at how many fricking languages some projects use sounds like a bad idea. Something great will come out of this. It's just annoying for now :/
@cthutu
@cthutu 2 жыл бұрын
NULLs are definitely a billion dollar mistake. It's the main reason so much software crashes nowadays. The issue is that programmers are not forced to check if they can become NULL. Carbon is definitely right here, Odin is wrong. Rust's Option is perfect because it will optimise to a null pointer for the None case. Hopefully, Carbon has the same optimisation.
@GingerGames
@GingerGames 2 жыл бұрын
Odin's `Maybe(^T)` is identical to `Option` in Rust in terms of semantics and optimizations. I think the notion that “null” is a billion dollar mistake is well overblown. NULL/nil is just one of many invalid memory addresses, and in practice most of invalid memory address are not NULL. This is related to the drunkard’s search principle (a drunk man looks for his lost keys at night under a lamppost because he can see in that area). I have found that null pointers are usually very easy to find and fix, especially since most platforms reserve the first page of (virtual) memory to check for these errors. In theory, NULL is still a perfectly valid memory address it is just that we have decided on the convention that NULL is useful for marking a pointer as unset. Many languages (including Odin) now have support for maybe/option types or nullable types (monads), however I am still not a huge fan of them in practice as I rarely require them in systems-level programming. I know very well this is a “controversial” opinion, but systems-level programming languages deal with memory all the time and can easily get into “unsafe” states on purpose. Restricting this can actually make things like custom allocators very difficult to implement, along with other things.
@cthutu
@cthutu 2 жыл бұрын
@@GingerGames My point isn't that null dereferencing crashes are not easy to spot or fix. This fact is of little use after software is released. When it crashes on a user's machine, you're not going to be there to fix the issue. And my point isn't that NULL isn't a perfectly valid memory address for representation. The issue is mixing the NULL representation with a valid reference. These should not be part of the same type. They should be distinct types despite the fact that on the CPU it's represented as a zero pointer. This means that you can't pass a null reference to code that expects a non-null reference (or vice versa). That's the billion dollar mistake. And I don't think it's overblown at all. A huge proportion of RELEASED software crashes due to dereferenced null pointers. If the code used Option (or the Odin equivalent), then such an occurrence is an impossibility. Congratulations, you've wiped out most of the crash bugs. This is because you won't be able to dereference `None` and hope the compiler passes. Now all you have to worry about is dangling pointer issues caused by pointer aliasing. Something that is impossible in Rust too. C++ and similar languages will let you blow your foot off here if you're not careful because it has a poor model for ownership.
@GingerGames
@GingerGames 2 жыл бұрын
@@cthutu there is a huge misunderstanding here. The solution to the NULL pointer problem is not better pointers/references but to not use pointers but use a better tool: handles. Handles are better than pointers. Handles can be smaller, have generational counters on them, and other metadata. The can be ensured to be safe to use at runtime due to the explicit checking. They don't have any of the ownership issues too. NULL pointers are not a problem to be "solved" since the better solution is to not use anything like pointer/reference.
@cthutu
@cthutu 2 жыл бұрын
@@GingerGames again I disagree that the solution isn't better pointers/references. The reason I think that is based on my experience with rust. Here I have references that are safe. No aliasing, dangling pointers or null dereferencing. But still a simple pointer. No need for higher abstractions such as handles. Handles are a good solution for C++ because of C++ and its poor type system.
@GingerGames
@GingerGames 2 жыл бұрын
@@cthutu Handles have nothing to do with the a poor type system. I highly recommend you read floooh's article on the topic "Handles are the better pointers". Handles separate the resource reference from the resource memory address, and allow for a lot more benefits than a reference could ever give. People in Rust use handles all the time too!!!!
@BradenBest
@BradenBest 2 жыл бұрын
If you don't care about maximizing performance, undefined behavior is easy to avoid. UB is not inherently bad though. By leaving the behavior undefined and acknowledging that you shouldn't do X, a contract of sorts is formed between the developer and the language. The programmer agrees to not do specific things, and the language uses this assurance to cut corners. This is often called the "worse is better" philosophy, and you can't argue with its success, as software designed under this philosophy spreads like a _virus,_ and improves over time. Unix, C, most of the software that exists and is relied upon today is built on this philosophy. And to those who give it the time of day, a modern C compiler is actually a very effective software development tool capable of as much safety and error detection as any other TheRightThing language that proclaims safety. Don't knock UB just because it makes things harder. UB enables software that rivals the performance of an assembly language while still being portable. It's not just questions like "what should the compiler do if a signed int overflows", it's also questions like "what happens when an out-of-bounds pointer is dereferenced" and "should it be the compiler/runtime's responsibility to protect against that". UB says no, and lets the compiler assume that these things can't happen. So sure in the early days a badly programmed application could crash a whole OS, but the nature of Worse Is Better is that the technology improves over time. Nowadays, you don't _need_ your compiler to protect your OS, because the OS can protect itself. Anyone who has experienced a segmentation fault knows this first hand. But something that people don't really pay attention to is the fact that the compilers improve, too. C compilers these days are VERY sophisticated and are capable of warning about most causes of UB. From options like -Wall -Wextra to -fstanitize=address, the tools have improved tremendously. It's easier than ever to write safe, portable C code that compiles with -O3 and works reliably. Take writing to a string literal, for example. You can assign strings to be `const char *` for that extra layer of protection in case you later forget it was read-only and the compiler will treat violations as an error. I advise anyone programming C to enable all warnings and take all warnings seriously. If your compiler spits out warnings and you ignore them and proceed to complain about bugs, that's on you. By the way, C23 (the next standard in the ISO C spec) will be requiring two's complement signed representation.
@GingerGames
@GingerGames 2 жыл бұрын
UB is inherently bad and only exists because of the legacy of C and C++. It is not inherent to a design of a language and has little to do with "optimizations" here (no matter how many people assert this as if it is even true). Compiler writers do "exploit" UB and "optimize" around, to which I don't believe that is any form of optimizing whatsoever and an absolute danger. I do care about maximizing performance a hell of a lot but I do also want my code to do what I expect it to do, and when writing in C and C++, it is nigh impossible to write code which does not invoke some form of "UB". I do not knock it because it makes things "harder" but rather there is no good reason it needs to exist in modern languages because every instance of "UB", you can literally define anything you need be it at the language level, compiler level, platform level, or vendor/core-library level. You need rules of the game to even actually optimize something to begin with. If you have no rules, you are not "optimizing" are just producing literal garbage: Garbage In Garbage Out.
@KaiHenningsen
@KaiHenningsen 2 жыл бұрын
Hmm. "Carbon Language - First Impressions from the Creator of the Odin Programming Language" ... talks more about Odin than about Carbon.
@tbird81
@tbird81 2 жыл бұрын
How do people use Twitter? That guy literally listed his pronouns.
@drcpaintball
@drcpaintball 2 жыл бұрын
"Creator of a shovelware language explains why his shovelware lang is better than another, also incomplete shovelware language"
@msmshazan
@msmshazan 2 жыл бұрын
Second
@Lucretia9000
@Lucretia9000 Жыл бұрын
WTF is hair?
@GingerGames
@GingerGames Жыл бұрын
Any of the cylindrical, keratinized, often pigmented filaments characteristically growing from the epidermis of a mammal.
@madflash4079
@madflash4079 2 жыл бұрын
third
@zxcaaq
@zxcaaq Жыл бұрын
honestly its just c++ but with a new worse syntax? this is embarrasing.
@elguapo3436
@elguapo3436 2 жыл бұрын
This is the never-ending story about replacing C or C++, seriously! Is this a joke? The Linux kernel, the scientific software layers and libraries, the critical systems... the several million lines of C++ code to be rewritten/recast or re-engineered in this new thing...Good luck re-writing the whole f**ng world 😂 and what's the catch with that ugly syntax ? CarbonCON in a Carbon free world...! 😂
@coderdfc4048
@coderdfc4048 2 жыл бұрын
Well one of the goals of carbon is that you dont have to rewrite whole codebase but use them both. Also believe it or not c++ is not “that” used in scientific software
@elguapo3436
@elguapo3436 2 жыл бұрын
@@coderdfc4048 For well objective reasons I definitely do believe that C++ is heavily used in scientific software well, I see that every time I compile a heavy open-source scientific software (and its underlying dependencies 90% of them in C++), to name just a few on the fly: MOOSE framework, Deal.ii, nektar++, Elmer, openfoam, Trilinos, petsc in C, SALOME, GetFEM++, MFEM, FREEFEM, DUNE... Object oriented c++ is heavily used in these high performance computing codes, and this list is a tiny little < 1% one. As you may already know Sandia Livermore Idaho national labs and the majority of research institutions across the world use C++ as their main programming/problem solving language. Other languages are either used for preprocessing, post-processing or rapid prototyping and data visualization.
@coderdfc4048
@coderdfc4048 2 жыл бұрын
@@elguapo3436 my mistake, i should not have generalised. I have been working in aerospace industry for past 10 years, and i have been an intern at cern a couple of times while I was a student, and i have rearly seen any c++ code. Most of the code is written in java, python, mathlab, lua, fortan, ada. I think only less than 10% of the code i touch is c++. But i guess it depends on where you work and in what area you work.
Odin Programming Language: An Introduction - 2020-11-26
46:02
gingerBill
Рет қаралды 33 М.
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 84 МЛН
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 10 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 16 МЛН
The Vlang Drama
43:35
ThePrimeTime
Рет қаралды 100 М.
I Tried JAI, Can It Replace C++?! (Programming Language)
21:05
Carbon Language - Who is it even for?
17:36
gingerBill
Рет қаралды 28 М.
Vlang: The language of 2023?? | Prime React
35:53
ThePrimeTime
Рет қаралды 131 М.
My Rant on C++
27:44
gingerBill
Рет қаралды 23 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 252 М.
Zig for Impatient Devs
9:48
Isaac Harris-Holt
Рет қаралды 85 М.
女孩妒忌小丑女? #小丑#shorts
00:34
好人小丑
Рет қаралды 84 МЛН