"Zero cost" is literally just false. It's not true that it's zero cost over C++, and it's not true that it's zero cost over asm. It's just plain wrong. Things should just be called abstractions, never "zero cost" abstractions because they aren't, and that's that.
-
-
Replying to @cmuratori @Jonathan_Blow and
That's an extremely interesting claim. I have no idea how to evaluate it, though; would you recommend just comparing the assembly generated by template-heavy code to some hand-written code doing the same thing? Do you have an example of a specific resource you could point me to?
1 reply 0 retweets 0 likes -
Replying to @BatmanAoD @Jonathan_Blow and
Not to beat a dead horse, but evaluating my claim that there _aren't_ "zero cost abstractions" is also approaching the problem the wrong way around. Shouldn't the goal be to evaluate the _original_ claim that there _are_ zero cost abstractions?
1 reply 1 retweet 8 likes -
Replying to @cmuratori @BatmanAoD and
One thing you will notice if you look at it, is that basically nobody who claims to provide a "zero cost abstraction" ever offers any proof that it is. They just say something like "and the compiler can do it" and that's it. But where is the evidence? Where are the case studies?
1 reply 1 retweet 6 likes -
Replying to @cmuratori @BatmanAoD and
The onus shouldn't be on people to prove that something _isn't_ "zero cost", it should be on the people claiming it's "zero cost" to prove that it _is_, right? And that proof is nowhere to be found.
1 reply 0 retweets 8 likes -
Replying to @cmuratori @BatmanAoD and
And it's worth noting that the original claim is _very_ bold. They're not called "low cost abstractions", they're called "_zero_ cost abstractions". A claim that something is literally free should require a high level of proof. Yet it's quite the opposite.
3 replies 1 retweet 6 likes -
Replying to @cmuratori @Jonathan_Blow and
Kyle J Strand Retweeted Kyle J Strand
Well, again, it was never intended to mean "literally free"; and, yes, it's a terrible term. But there are some abstractions that _are_ free; for instance, without exception support, Rust's `Box` can result in exactly the same code as a raw pointer:https://twitter.com/BatmanAoD/status/1235750716334960640 …
Kyle J Strand added,
2 replies 0 retweets 0 likes -
Replying to @BatmanAoD @Jonathan_Blow and
I'm going to tune out of this discussion now, but again, no one is arguing that abstractions don't _sometimes_ result in the optimal code. The point is they don't _always_ result in the optimal code. The fact that Rust occasionally produces the right thing is irrelevant.
2 replies 1 retweet 4 likes -
Replying to @cmuratori @Jonathan_Blow and
My impression of Jonathan's original argument was (at least in part) that lambdas cannot produce optimal code compared to macros. He provided Carruth's talk as evidence that zero-cost abstractions _don't exist_.
1 reply 0 retweets 2 likes -
This Tweet is unavailable.
You can lead a horse to water...
-
-
Replying to @cmuratori @Jonathan_Blow and
And then you can drown it. (I do not support animal cruelty comment was meant only for humans)
1 reply 0 retweets 3 likes -
Replying to @giuliano_b @cmuratori and
Casey Muratori blocked me, so I'm extremely curious what this joke (?) means.
0 replies 0 retweets 0 likes
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.