Thread overview | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 10, 2003 Assert stacks | ||||
---|---|---|---|---|
| ||||
I know this has been said before, but having some stack trace in an assertion would be *very* useful |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | Being able to debug would help too... :)
--
Jan-Eric Duden
"Matthew Wilson" <matthew@stlsoft.org> wrote in message
news:bm544r$1pk0$1@digitaldaemon.com...
> I know this has been said before, but having some stack trace in an assertion would be *very* useful
>
>
|
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bm544r$1pk0$1@digitaldaemon.com... > I know this has been said before, but having some stack trace in an assertion would be *very* useful It's Daniel Y's Most Requested Feature <g>. |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan-Eric Duden | I suppose, D is sufficiently "high-level" that I've not yet really felt the need. If it had assert and exception stacks, I may never feel that need. ;) "Jan-Eric Duden" <jeduden@whisset.com> wrote in message news:bm5mh1$2jd9$1@digitaldaemon.com... > Being able to debug would help too... :) > > -- > Jan-Eric Duden > "Matthew Wilson" <matthew@stlsoft.org> wrote in message > news:bm544r$1pk0$1@digitaldaemon.com... > > I know this has been said before, but having some stack trace in an assertion would be *very* useful > > > > > > |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Matthew Wilson | Sure, D is high-level, but don't you make mistakes modelling an algorithm?
Debugging helps, it takes you by your hand, and goes with you through the
algorithm step by step.
that's easier and faster than putting assertions after every statement.
And after all, D is suposed to make our lives better :), but it doesn't improve mine without a debugger :(.
--
Jan-Eric Duden
"Matthew Wilson" <matthew@stlsoft.org> wrote in message
news:bm5nk1$2kpi$1@digitaldaemon.com...
> I suppose, D is sufficiently "high-level" that I've not yet really felt
the
> need. If it had assert and exception stacks, I may never feel that need.
;)
>
> "Jan-Eric Duden" <jeduden@whisset.com> wrote in message news:bm5mh1$2jd9$1@digitaldaemon.com...
> > Being able to debug would help too... :)
> >
> > --
> > Jan-Eric Duden
> > "Matthew Wilson" <matthew@stlsoft.org> wrote in message
> > news:bm544r$1pk0$1@digitaldaemon.com...
> > > I know this has been said before, but having some stack trace in an assertion would be *very* useful
> > >
> > >
> >
> >
>
>
|
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan-Eric Duden | "Jan-Eric Duden" <jeduden@whisset.com> wrote in message news:bm5vhd$2uo8$1@digitaldaemon.com... > Sure, D is high-level, but don't you make mistakes modelling an algorithm? Never! Well, sometimes, maybe. But don't tell anyone! > Debugging helps, it takes you by your hand, and goes with you through the > algorithm step by step. > that's easier and faster than putting assertions after every statement. Indeed. I am a big fan of the debugger. That's why I've been stuck to the Visual Studio 97/98 IDE for the last 6 years. Nothing else is as powerful + as efficient to use. In other words, *all* the other IDEs that I've used - which is a lot - make you take your hands off the keyboard. Maybe that's why some developers are proven to be up to 30 times as productive as others, they're using IDEs that can be run entirely from the keyboard? > And after all, D is suposed to make our lives better :), but it doesn't improve mine without a debugger :(. I wasn't saying I won't need one, just that I haven't yet. I too would like a debugger > Jan-Eric Duden > "Matthew Wilson" <matthew@stlsoft.org> wrote in message > news:bm5nk1$2kpi$1@digitaldaemon.com... > > I suppose, D is sufficiently "high-level" that I've not yet really felt > the > > need. If it had assert and exception stacks, I may never feel that need. > ;) > > > > "Jan-Eric Duden" <jeduden@whisset.com> wrote in message news:bm5mh1$2jd9$1@digitaldaemon.com... > > > Being able to debug would help too... :) > > > > > > -- > > > Jan-Eric Duden > > > "Matthew Wilson" <matthew@stlsoft.org> wrote in message > > > news:bm544r$1pk0$1@digitaldaemon.com... > > > > I know this has been said before, but having some stack trace in an assertion would be *very* useful > > > > > > > > > > > > > > > > > > > > |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> escreveu na mensagem news:bm5mnj$2jor$1@digitaldaemon.com... > > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bm544r$1pk0$1@digitaldaemon.com... > > I know this has been said before, but having some stack trace in an assertion would be *very* useful > > It's Daniel Y's Most Requested Feature <g>. That's true. When will we have it? ;) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.524 / Virus Database: 321 - Release Date: 7/10/2003 |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Yokomiso | "Daniel Yokomiso" <daniel_yokomiso@yahoo.com.br> escreveu na mensagem news:bm61dr$316t$1@digitaldaemon.com... > "Walter" <walter@digitalmars.com> escreveu na mensagem news:bm5mnj$2jor$1@digitaldaemon.com... > > > > "Matthew Wilson" <matthew@stlsoft.org> wrote in message news:bm544r$1pk0$1@digitaldaemon.com... > > > I know this has been said before, but having some stack trace in an assertion would be *very* useful > > > > It's Daniel Y's Most Requested Feature <g>. > > That's true. When will we have it? ;) Also would be very nice to be able to add messages to "assert", so we could write: public void assertEquals(Object left, Object right) { assert(left == right, "Expected <" ~ left.toString() ~ ">\r\n" ~ "Received <" ~ right.toString() ~ ">"); } and get a nice message instead of a bland "Assertion Error". --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.524 / Virus Database: 321 - Release Date: 7/10/2003 |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jan-Eric Duden | "Jan-Eric Duden" <jeduden@whisset.com> escreveu na mensagem news:bm5vhd$2uo8$1@digitaldaemon.com... > Sure, D is high-level, but don't you make mistakes modelling an algorithm? Sure that's where design by contract helps you. You write the preconditions and posconditions of every function, and when you test it the compiler will do the checks and tell you "The parameter foo should be a list sorted by bar but wasn't". If you have the contracts for all of your functions you'll quickly find your bugs. > Debugging helps, it takes you by your hand, and goes with you through the > algorithm step by step. > that's easier and faster than putting assertions after every statement. It isn't a matter of putting assertions after every statement, instead you decompose your problem in smaller parts and write the contracts of those parts. Since I started using unit tests and DbC in my code I don't mess with the debugger anymore, perhaps once a year to debug third party code ;) > And after all, D is suposed to make our lives better :), but it doesn't improve mine without a debugger :(. > > -- > Jan-Eric Duden [snip] Best regards, Daniel Yokomiso. "...didn't some bloke 2000 years ago write 'before you unwind the for loop in your brothers code take the unbounded recursion out of your own.'" - Mike Wynn --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.524 / Virus Database: 321 - Release Date: 7/10/2003 |
October 10, 2003 Re: Assert stacks | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Yokomiso | > > > Debugging helps, it takes you by your hand, and goes with you through the > > algorithm step by step. > > that's easier and faster than putting assertions after every statement. > > It isn't a matter of putting assertions after every statement, instead you decompose your problem in smaller parts and write the contracts of those parts. Since I started using unit tests and DbC in my code I don't mess with > the debugger anymore, perhaps once a year to debug third party code ;) If you have a bug in your mind and therefore your model, then you need to work statement by statement. Unittests only help to see that there is a bug, but it doesn't help much to locate it. > ... Jan-Eric |
Copyright © 1999-2021 by the D Language Foundation