General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Younes Mdarhri Alaoui
Developer Voices
comments
Comments by "Younes Mdarhri Alaoui" (@younesmdarhrialaoui643) on "What's Zig got that C, Rust and Go don't have? (with Loris Cro)" video.
Is Zig faster than C and in which case?
1
@anon_y_mousse do you have anything other than a bad opinion?
1
@anon_y_mousse My attitude is because of two things: 1. Your malice is in spreading your false ideas. I hate people who don't know and instead of acknowledging their ignorance (which is not a bad thing) say whatever their imagination has told them to say. You have no reason to believe what you believe other than a flawed logic and bad opinion. 2. I'm not a very nice guy.
1
@anon_y_mousse One example; when you use a signed integer in C and there is an overflow, this is an undefined behaviour. If you use an unsigned integer though, it is not and the addition overflow is wrapping. In Zig both unsigned and signed overflow are illegal. You can then exploit these things to make them undefined behaviour. For the specific case of unsigned overflow, it could’ve been an opinion that I would accept. But all you’ve said is that all these languages live on the LLVM platform have equivalent code generation. I just gave you an example that demonstrates this claim to be fake.
1
@anon_y_mousse First and foremost, when we are talking about a programming language we are also talking about its implementations (compilers). Second, and to emphasize what you said, I haven’t seen any C compiler that doesn’t do it like Zig does it (which is imo how it should be for such a language). Third, this is not unequal code in the perspective of the developer but unequal in the perspective of the computer which goes exactly against what you’ve said earlier that Rust and co have equivalent code and there is no difference in speed. Also, I don’t care if Zig is faster or slower, as a matter of fact I would prefer for C to be better all around since I know a whole lot more C than Zig. Finally, yes I wanted to fight. I always have a desire to fight.
1
@anon_y_mousse and you’re making my point and contradicting yours again. I’m not sure if you’re trying to do some reverse psychology on me but it’s not working. YOU have said that Rust, Zig, C, etc generates equivalent code AND I SAID that this was a lie. Why are you trying to flip the switch? If you wanted to generate similar code in C than in Zig then you would have to write a new compiler which is basically rewriting a whole entire part of the programming language. No compiler in C does it the way Zig does so as long as a new C compiler will come into the picture, Zig will be faster at least in the example provided. Also I’m not saying that I’m argumentative even though I knew you were right (which you are not) im saying that I’m argumentative because I like it.
1
@anon_y_mousse Sure.
1
@anon_y_mousse I just saw your answer but how did I give up? I just said that sure these two pieces of code are equivalent and so would they be if one was written in python and the other in C or C++
1
@anon_y_mousse Who said that same syntax meant same binary? I thought I was the one advocating for the exact opposite and gave you the example of the wrapping int in C that turns into an UB in Zig hence making Zig faster. I first was saying that some things in a X language did not translate apple to apple in another Y language (wrapping int). Also, I disagreed - and still do - categorically that because a language is directly compiled to machine code and lives on the LLVM platform is as performant as another language that have the same characteristics. If so, we might as well declare that Swift is just as performant as C. Lastly, there are some implementations in one language that are extremely feasible and realistic in one language and not very feasible or even realistically impossible to implement in another one. Not only are there things that you simply cannot change as the programming language user, but there are also things that realistically are not changeable although in theory they could be.
1