[Issue 6857] Precondition contract checks should be statically bound.

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6857 Iain Buclaw changed: What|Removed |Added Priority|P2 |P3 --

[Issue 6857] Precondition contract checks should be statically bound.

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6857 --- Comment #89 from Andrei Alexandrescu and...@erdani.com --- To clarify: this issue is preapproved and is waiting for an implementation. --

[Issue 6857] Precondition contract checks should be statically bound.

2013-01-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #87 from deadalnix deadal...@gmail.com 2013-01-10 00:41:57 PST --- (In reply to comment #85) I've had the opportunity to discuss the matter with Bertrand Meyer himself and with a graduate student of his. Bertrand didn't have a

[Issue 6857] Precondition contract checks should be statically bound.

2013-01-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #88 from Andrei Alexandrescu and...@erdani.com 2013-01-10 09:14:02 PST --- @Walter: would you preapprove this? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail

[Issue 6857] Precondition contract checks should be statically bound.

2012-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #86 from Andrei Alexandrescu and...@metalanguage.com 2012-09-05 07:27:40 PDT --- Forgot to mention - I attached the relevant page from the book (Walter found it) that makes it as clear as it gets how inherited preconditions should

[Issue 6857] Precondition contract checks should be statically bound.

2012-09-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #85 from Andrei Alexandrescu and...@metalanguage.com 2012-09-05 07:26:07 PDT --- I've had the opportunity to discuss the matter with Bertrand Meyer himself and with a graduate student of his. Bertrand didn't have a defined answer

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #81 from Stewart Gordon s...@iname.com 2012-07-10 05:05:48 PDT --- (In reply to comment #80) (In reply to comment #79) - we have variadics that are really just C's variadics with typeinfo added We also have C's variadics.

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #83 from Stewart Gordon s...@iname.com 2012-07-10 15:47:32 PDT --- (In reply to comment #82) (In reply to comment #81) But no use case I can see for using a C-style variadic for a D class method. I dunno, maybe you want to pass

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #76 from yebblies yebbl...@gmail.com 2012-07-10 02:54:06 EST --- (In reply to comment #55) Unfortunately, I do not currently see a reasonable way of implementing this. Fortunately, as is it does not inhibit correct programs, it

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #77 from Stewart Gordon s...@iname.com 2012-07-09 11:12:52 PDT --- (In reply to comment #76) I can't see any way to do it without changing the abi for virtual functions with contracts. What about my suggestion of comment 61? --

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com ---

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #79 from Stewart Gordon s...@iname.com 2012-07-09 15:22:23 PDT --- (In reply to comment #78) As Walter said, that requires argument forwarding, which introduces copying problems and doesn't work with variadics. I thought I'd

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #80 from yebblies yebbl...@gmail.com 2012-07-10 14:02:54 EST --- (In reply to comment #79) (In reply to comment #78) But it does seem to be down to two problems with D's design: - structs aren't guaranteed to be safe to just

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 David Piepgrass qwertie...@gmail.com changed: What|Removed |Added CC|

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #71 from deadalnix deadal...@gmail.com 2012-07-08 14:50:57 PDT --- The error is in the fact that addAll isn't aware of B. You can solve that easily with metaprograming, or by overloading addAll for B. -- Configure issuemail:

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #72 from timon.g...@gmx.ch 2012-07-08 14:58:07 PDT --- (In reply to comment #70) I must say, I would be entirely opposed to fixing this bug. As far as I can see, the arguments of Timon and deadalnix have been entirely theoretical,

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #73 from timon.g...@gmx.ch 2012-07-08 15:08:47 PDT --- (In reply to comment #70) P.S. Besides which, the implementation difficulties mentioned by Walter in comment 58 are really big difficulties, that don't seem worth it for

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #74 from Stewart Gordon s...@iname.com 2012-07-08 15:59:47 PDT --- (In reply to comment #72) (In reply to comment #70) // BTW I wanted to use an interface here, but I get // missing body { ... } after in or out // and then if I

[Issue 6857] Precondition contract checks should be statically bound.

2012-07-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #75 from David Piepgrass qwertie...@gmail.com 2012-07-08 17:05:28 PDT --- I must say, I would be entirely opposed to fixing this bug. As far as I can see, the arguments of Timon and deadalnix have been entirely theoretical,

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #61 from Stewart Gordon s...@iname.com 2012-05-07 03:58:47 PDT --- (In reply to comment #58) It's not that simple. Several considerations have to be met: 1. Because of struct construction/destruction, you really only want to

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #62 from deadalnix deadal...@gmail.com 2012-05-07 04:43:25 PDT --- (In reply to comment #60) This has been some significant pwning of Walter and myself, and I think there is a larger lesson here we should learn. Quoting

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #63 from Walter Bright bugzi...@digitalmars.com 2012-05-07 08:29:21 PDT --- (In reply to comment #61) (In reply to comment #58) It's not that simple. Several considerations have to be met: 1. Because of struct

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #64 from deadalnix deadal...@gmail.com 2012-05-07 09:00:05 PDT --- (In reply to comment #63) Again, you're pushing the parameters on the stack twice - and this won't work for variadic functions. Why not jump in the function

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #65 from Walter Bright bugzi...@digitalmars.com 2012-05-07 09:36:56 PDT --- (In reply to comment #64) Why not jump in the function directly after the prolog and not push arguments twice on the stack ? Not so easy given how back

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #66 from Stewart Gordon s...@iname.com 2012-05-07 10:32:33 PDT --- (In reply to comment #63) Can't this be solved by simply making all struct parameters to the in/out functions ref? Losing all C ABI compatiblity in the

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #67 from Stewart Gordon s...@iname.com 2012-05-07 10:48:26 PDT --- (In reply to comment #62) Changing how the language work must be done only if strong arguments are made. Unless I've missed something, the language leaves this

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #68 from Walter Bright bugzi...@digitalmars.com 2012-05-07 12:17:19 PDT --- (In reply to comment #66) (In reply to comment #63) Can't this be solved by simply making all struct parameters to the in/out functions ref?

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #69 from Stewart Gordon s...@iname.com 2012-05-07 12:26:47 PDT --- (In reply to comment #68) 1. pass by ref is semantically very different from pass by value. It is necessary to support both. The function that implements a

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #56 from Don clugd...@yahoo.com.au 2012-05-06 00:36:04 PDT --- (In reply to comment #55) Mea culpa. I read Meyer's book again. Chapter 16.1 Cutting out the middleman pg. 575 says: A client of MATRIX must satisfy the original

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #57 from deadalnix deadal...@gmail.com 2012-05-06 02:20:47 PDT --- (In reply to comment #55) So I'm reopening it as a normal bug. Thank you ! Unfortunately, I do not currently see a reasonable way of implementing this.

Re: [Issue 6857] Precondition contract checks should be statically bound.

2012-05-06 Thread Walter Bright
On 5/6/2012 2:19 AM, d-bugm...@puremagic.com wrote: That is not this complicated. you need a final function that check the in contract, then call another virtual function that actually execute the function body and the out contract. With such a configuration, the in contract is checked and only

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #59 from deadalnix deadal...@gmail.com 2012-05-06 03:27:45 PDT --- (In reply to comment #58) It's not that simple. Several considerations have to be met: 1. Because of struct construction/destruction, you really only want to

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #60 from Andrei Alexandrescu and...@metalanguage.com 2012-05-06 19:48:55 PDT --- This has been some significant pwning of Walter and myself, and I think there is a larger lesson here we should learn. We essentially operated from

Re: [Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread Max Samukha
On Saturday, 5 May 2012 at 05:57:31 UTC, Don wrote: http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #46 from Don clugd...@yahoo.com.au 2012-05-04 22:58:38 PDT --- (In reply to comment #45) (In reply to comment #44) But going by comment 26, there is no breakage of correct

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #47 from Walter Bright bugzi...@digitalmars.com 2012-05-05 02:02:48 PDT --- (In reply to comment #46) Now, change F from a struct to a class. We believe that the code should still fail to compile. A theorem prover could not

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #47 from Walter Bright bugzi...@digitalmars.com 2012-05-05 02:02:48 PDT --- (In reply to comment #46) Now, change F from a struct to a class. We believe that the code should still fail to compile. A theorem prover could not

Re: [Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread Walter Bright
Please reply on bugzilla, replying here is most likely to be overlooked.

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #49 from Stewart Gordon s...@iname.com 2012-05-05 04:40:48 PDT --- (In reply to comment #47) (In reply to comment #46) Now, change F from a struct to a class. We believe that the code should still fail to compile. A

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #50 from deadalnix deadal...@gmail.com 2012-05-05 05:04:07 PDT --- (In reply to comment #33) (In reply to comment #32) (In reply to comment #30) fizzbuzz() clearly has a bug. It will fail if given an A which isn't actually

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #51 from deadalnix deadal...@gmail.com 2012-05-05 06:22:21 PDT --- (In reply to comment #49) Runtime polymorphism is about overriding behaviour, not overriding legality. This is, indeed, the whole essence of the problem. (In

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #52 from Andrei Alexandrescu and...@metalanguage.com 2012-05-05 08:54:17 PDT --- (In reply to comment #51) I'm sorry, but this reading can't close the discussion. I think it does. The proposed behavior does not allow this: None

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #53 from deadalnix deadal...@gmail.com 2012-05-05 08:58:21 PDT --- (In reply to comment #52) (In reply to comment #51) I'm sorry, but this reading can't close the discussion. I think it does. The proposed behavior does not

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #54 from Stewart Gordon s...@iname.com 2012-05-05 09:21:02 PDT --- (In reply to comment #52) Doing a better job is succeeding where the parent method would have failed its precondition. It all boils down to the fact that it's

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #27 from Andrei Alexandrescu and...@metalanguage.com 2012-05-04 04:03:36 PDT --- (In reply to comment #26) No it isn't. OOP doesn't say anything about contracts. The concept of contract is different and the question here is how

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #28 from Don clugd...@yahoo.com.au 2012-05-04 04:48:20 PDT --- (In reply to comment #27) (In reply to comment #26) There's no reason to doubt you are telling the truth, so this must be quite an interesting case of confirmation

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #29 from Andrei Alexandrescu and...@metalanguage.com 2012-05-04 05:35:12 PDT --- (In reply to comment #28) The literally FIRST hit takes to a slide deck, see http://goo.gl/544fU. There there is theory and examples on how

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #30 from Don clugd...@yahoo.com.au 2012-05-04 05:57:39 PDT --- (In reply to comment #29) (In reply to comment #28) The literally FIRST hit takes to a slide deck, see http://goo.gl/544fU. There there is theory and examples

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #31 from Andrei Alexandrescu and...@metalanguage.com 2012-05-04 06:21:14 PDT --- (In reply to comment #30) You are making a massive assumption here, which I don't see in the slides. The assumption is that fizzbuzz gets access to

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #32 from Stewart Gordon s...@iname.com 2012-05-04 10:38:33 PDT --- (In reply to comment #30) fizzbuzz() clearly has a bug. It will fail if given an A which isn't actually a B. Exactly. fizzbuzz is calling a method of A, not a

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #33 from Walter Bright bugzi...@digitalmars.com 2012-05-04 11:42:40 PDT --- (In reply to comment #32) (In reply to comment #30) fizzbuzz() clearly has a bug. It will fail if given an A which isn't actually a B. Exactly.

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #34 from Stewart Gordon s...@iname.com 2012-05-04 13:27:50 PDT --- (In reply to comment #33) OK, so there's this issue. It may also be a documented guarantee that the return value from bar is a valid argument for foo. But you

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #35 from Walter Bright bugzi...@digitalmars.com 2012-05-04 13:41:50 PDT --- (In reply to comment #34) But you could still argue that the call is in breach of A's API and therefore the code is incorrect. Again, this is NOT true.

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #36 from Stewart Gordon s...@iname.com 2012-05-04 13:49:11 PDT --- (In reply to comment #35) snip Again, this is NOT true. The type of the argument is not statically A, it is a polymorphic type A. Why do you consider the

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #37 from Walter Bright bugzi...@digitalmars.com 2012-05-04 14:13:50 PDT --- (In reply to comment #36) (In reply to comment #35) snip Again, this is NOT true. The type of the argument is not statically A, it is a polymorphic

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #38 from Stewart Gordon s...@iname.com 2012-05-04 14:30:40 PDT --- (In reply to comment #37) Then I am lost as to what you think is broken in the design. In how many different ways does the same thing need to be explained to you

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #39 from Walter Bright bugzi...@digitalmars.com 2012-05-04 14:46:11 PDT --- Please write a piece of code that asserts when it should not, or passes when it should not, compile it, verify this incorrect behavior, and post it here.

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #40 from Stewart Gordon s...@iname.com 2012-05-04 14:52:44 PDT --- (In reply to comment #39) Please write a piece of code that asserts when it should not, or passes when it should not, compile it, verify this incorrect behavior,

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #41 from Walter Bright bugzi...@digitalmars.com 2012-05-04 15:18:08 PDT --- (In reply to comment #40) (In reply to comment #39) Please write a piece of code that asserts when it should not, or passes when it should not,

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #42 from Stewart Gordon s...@iname.com 2012-05-04 15:27:45 PDT --- (In reply to comment #41) Example #1 expects behavior based on the static type, which is not polymorphic OOP at all. True, but it is what this enhancement request

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #43 from Walter Bright bugzi...@digitalmars.com 2012-05-04 17:40:19 PDT --- (In reply to comment #42) True, but it is what this enhancement request is all about. Breaking correct OOP behavior is not an enhancement. It will not

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #44 from Stewart Gordon s...@iname.com 2012-05-04 17:50:19 PDT --- (In reply to comment #43) (In reply to comment #42) True, but it is what this enhancement request is all about. Breaking correct OOP behavior is not an

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #45 from Walter Bright bugzi...@digitalmars.com 2012-05-04 18:18:11 PDT --- (In reply to comment #44) But going by comment 26, there is no breakage of correct OOP behaviour involved. So how is this relevant? This has already

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #46 from Don clugd...@yahoo.com.au 2012-05-04 22:58:38 PDT --- (In reply to comment #45) (In reply to comment #44) But going by comment 26, there is no breakage of correct OOP behaviour involved. So how is this relevant?

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #12 from deadalnix deadal...@gmail.com 2012-05-03 01:43:42 PDT --- (In reply to comment #11) The current specification is flawed. It have nothing to do with how inheritance work (and I could assure you I know what I'm talking

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #13 from Andrei Alexandrescu and...@metalanguage.com 2012-05-03 07:05:18 PDT --- I apologize but I still think the confusion goes the other way. A good way to arbiter this is to peruse the literature on the subject, as Walter

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #14 from deadalnix deadal...@gmail.com 2012-05-03 10:45:19 PDT --- (In reply to comment #13) I apologize but I still think the confusion goes the other way. A good way to arbiter this is to peruse the literature on the subject, as

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #15 from Walter Bright bugzi...@digitalmars.com 2012-05-03 11:07:27 PDT --- fizbuzzA(A a) { a.foo(); // A.foo's in contract is valid } If an instance of B is passed to fizbuzzA, then the a.foo() will call B.foo(), and either

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #16 from Don clugd...@yahoo.com.au 2012-05-03 11:56:47 PDT --- (In reply to comment #15) fizbuzzA(A a) { a.foo(); // A.foo's in contract is valid } If an instance of B is passed to fizbuzzA, then the a.foo() will call

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #17 from deadalnix deadal...@gmail.com 2012-05-03 13:44:36 PDT --- (In reply to comment #15) fizbuzzA(A a) { a.foo(); // A.foo's in contract is valid } If an instance of B is passed to fizbuzzA, then the a.foo() will call

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #18 from Walter Bright bugzi...@digitalmars.com 2012-05-03 15:37:00 PDT --- (In reply to comment #17) As you can see in given code, fizbuzzA is an invalid piece of code waiting to explode in your face. There is no bug in example

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #19 from Walter Bright bugzi...@digitalmars.com 2012-05-03 15:46:03 PDT --- (In reply to comment #16) This is the issue. WHY are they done based on the virtual type? Checking the contracts based on static typing would detect

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com ---

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Stewart Gordon s...@iname.com changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #23 from Stewart Gordon s...@iname.com 2012-05-03 18:21:44 PDT --- (In reply to comment #22) If you mean whether a given call is legal, then you could by the same argument insist that called method names must be resolved in the

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #24 from Walter Bright bugzi...@digitalmars.com 2012-05-03 18:50:03 PDT --- (In reply to comment #23) (In reply to comment #22) If you mean whether a given call is legal, then you could by the same argument insist that called

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-03 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #25 from Stewart Gordon s...@iname.com 2012-05-03 19:02:13 PDT --- (In reply to comment #24) No, I'm not. This thread is about overriding, not introducing, functions. It's about introducing new legal inputs to a function. Which

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 timon.g...@gmx.ch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 timon.g...@gmx.ch changed: What|Removed |Added Resolution|INVALID |WONTFIX --- Comment #8 from

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #10 from Walter Bright bugzi...@digitalmars.com 2012-05-02 16:27:15 PDT --- I suggest checking Bertrand Meyer's book Object-Oriented Software Construction, which is the definitive reference on this. It's theoretically sound. I did

[Issue 6857] Precondition contract checks should be statically bound.

2012-05-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Andrei Alexandrescu and...@metalanguage.com changed: What|Removed |Added CC|

[Issue 6857] Precondition contract checks should be statically bound.

2012-03-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 --- Comment #3 from jens.k.muel...@gmx.de 2012-03-02 00:35:52 PST --- (In reply to comment #2) (In reply to comment #1) Can you elaborate why the static type must be considered? What's the problem with using the dynamic type? The

[Issue 6857] Precondition contract checks should be statically bound.

2012-03-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 Don clugd...@yahoo.com.au changed: What|Removed |Added CC||clugd...@yahoo.com.au ---

[Issue 6857] Precondition contract checks should be statically bound.

2012-03-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 jens.k.muel...@gmx.de changed: What|Removed |Added CC||jens.k.muel...@gmx.de ---

[Issue 6857] Precondition contract checks should be statically bound.

2012-03-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6857 deadalnix deadal...@gmail.com changed: What|Removed |Added CC||deadal...@gmail.com