On 8/5/14, 5:26 PM, H. S. Teoh via Digitalmars-d wrote:
On Tue, Aug 05, 2014 at 05:09:43PM -0300, Ary Borenszweig via Digitalmars-d 
wrote:
On 8/5/14, 3:55 PM, H. S. Teoh via Digitalmars-d wrote:
On Tue, Aug 05, 2014 at 11:18:46AM -0700, Jeremy Powers via Digitalmars-d wrote:

Furthermore, I think Walter's idea to use asserts as a source of
optimizer hints is a very powerful concept that may turn out to be a
revolutionary feature in D.

LLVM already has it. It's not revolutionary:

http://llvm.org/docs/LangRef.html#llvm-assume-intrinsic

Even better, so there's precedent for this. Even if it's only exposed at
the LLVM level, rather than the source language. Introducing this at the
source language level (like proposed in D) is a good step forward IMO.


By the way, I think Walter said "assert can be potentially used to
make optimizations" not "Oh, I just had an idea! We could use assert
to optimize code". I think the code already does this. Of course, we
would have to look at the source code to find out...

If the code already does this, then what are we arguing about?

Exactly. I think the OP doesn't know that Walter wasn't proposing any semantic change in assert. Walter was just stating how assert works for him (or should work, but probably some optimizations are not implemented).

We should ask Walter, but I think he's offline...

Reply via email to