On Tue, 21 Sep 2010 11:59:51 +0300, Don nos...@nospam.com wrote:
bearophile wrote:
ponce:
Vibrant has been open source'd (again):
http://bitbucket.org/ponce/vibrant
Very good. I have seen 2D vectors implemented something like ten times
in D code, so I think it's time to stop this. They
On Sun, 10 Oct 2010 02:52:06 +0400, Austin Hastings ah0801...@yahoo.com
wrote:
On 10/8/2010 6:47 PM, Denis Koroskin wrote:
On Sat, 09 Oct 2010 02:36:30 +0400, Austin Hastings
ah0801...@yahoo.com wrote:
object.Exception: Test
00 rtdmain2mainrunMain
01 rtdmain2mainrunAll
On Sat, 09 Oct 2010 04:08:55 +0300, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
http://www.reddit.com/r/programming/comments/dohif/go_vs_d_interesting_thread_on_the_go_mailing_list/
Andrei
The quality of discussions on that Reddit thing is getting closer to
Youtuhe-comment
...
auto (|car, cdr...|) = expr;
This is not a complete introduction to tuple usefulness, but it gives
you some ideas. If you have questions, feel free to ask.
Bye,
bearophile
The syntax is too ugly, i don't know how you call it sugar :)
Sorry for the one liner. (Though it is not a one
On Thu, 07 Oct 2010 17:52:10 +0300, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 10/7/10 6:54 CDT, atommixz wrote:
It would be nice if it were possible to use the in expression wherever
possible. Now it is only implemented for associative. arrays. (Weird).
Examples of how this
On Fri, 08 Oct 2010 14:45:43 +0300, Juanjo Alvarez juan...@gmail.com
wrote:
Pelle Wrote:
The only drawback I can see to having an in operator with all
containers is that some programmers would not read the documentation and
use it expecting it to be fast. But then that also happens with
On Fri, 08 Oct 2010 14:58:27 +0300, Steven Schveighoffer
schvei...@yahoo.com wrote:
On Thu, 07 Oct 2010 21:18:56 -0400, Juanjo Alvarez f...@fakeemail.com
wrote:
On Thu, 7 Oct 2010 15:53:13 -0700, Jonathan M Davis
jmdavisp...@gmx.com wrote:
Except that when you're dealing with generic
On Fri, 2010-10-08 at 22:25 +0200, Gour D. wrote:
On Fri, 08 Oct 2010 17:26:25 +0100
Russel == Russel Winder rus...@russel.org.uk wrote:
Russel For C, C++, Fortran, and hence D, I personally find CMake
Russel awkward and clumsy.
Hmm...based on what I know, CMake is universe for
On Fri, 2010-10-08 at 21:41 +0200, Jens Mueller wrote:
Do you recommend to learn use CMake instead of using tools like
Xfbuild (I'm interested for D project and, so far, was accustomed to
Haskell's Cabal, so looking for similar experience.)
For C, C++, Fortran, and hence D, I
Reading these boards, both new and old posts, i hardly find any topic
that i disagree with you.
This one is one of those rare cases.
It is really hard for me to connect operator usage and operation
complexity. To me, operators are just cute, and mostly meaningful
(and not necessarily)
Lars T. Kyllingstad wrote:
On Wed, 06 Oct 2010 05:24:18 -0700, Jonathan M Davis wrote:
On Wednesday 06 October 2010 04:26:43 Steven Schveighoffer wrote:
BTW, bug 5000 coming up! Big milestone :)
Though I'm not sure that 5000 bugs is exactly something to celebrate...
- Jonathan M Davis
On Sat, 2010-10-09 at 00:16 +0200, Gour D. wrote:
[ . . . ]
Here is the waf list:
http://code.google.com/p/waf/wiki/ProjectsUsingWaf
The SCons list is at http://www.scons.org/wiki/SconsProjects but I
think there are some big users who haven't signed up there. Intel for
one who use SCons
Gour D. wrote:
On Fri, 8 Oct 2010 21:41:55 +0200
Jens == Jens Mueller jens.k.muel...@gmx.de wrote:
Jens Coming back to the original question. I can recommend CMake
Jens especially if one plans to do C and C++ programming. For D we
Jens (Steve, Dean and I) are trying to improve the support.
On Sat, 2010-10-09 at 12:06 +0200, Jens Mueller wrote:
[ . . . ]
With CMake you can check whether Qt is installed on the system. There is
a FindQt.cmake.
Waf can do this sort of thing simply as well, especially via pgk-config
if available. SCons is a little more clumsy but it is there and
On 9/10/2010 7:29 PM, so wrote:
The syntax is too ugly, i don't know how you call it sugar :)
Perhaps saccharin then? :-)
On 10/9/10 12:33 PM, Russel Winder wrote:
So putting a Mercurial repository with this source code on dsource.org
is the thing that is agreed? I guess this means making a new project?
Well, not really agreed – recently, a few large projects (LDC, QtD) have
migrated their sources away from
On 10/9/10 11:40 AM, Russel Winder wrote:
Well KDE was about to choose bksys (the immediate ancestor of Waf) until
some nasty politiking went on and all of a sudden they chose CMake. I
don't know all the details, but I know enough to say that that decision
was not made based on a proper study.
Russel Winder wrote:
On Fri, 2010-10-08 at 21:41 +0200, Jens Mueller wrote:
For C, C++, Fortran, and hence D, I personally find CMake awkward and
clumsy.
I also think CMake isn't that shiny. But you can get the job done once
you're familiar with it. And it has been adopted by some
gitoriouse is good and open source, you need use git as vcs
They are bitbucket with mercurial but the service has often a problem, less than
dsource i agree.
I think lyla was aiming at that. I don't know how usable it is though
since it isn't maintained anymore.
I just remember he tried to make it kinda backend-independent so you can
choose between BLAS and other implementations.
http://www.dsource.org/projects/lyla
On Sat, 2010-10-09 at 13:01 +0200, klickverbot wrote:
If you accuse someone of not basing the decision »on a proper study«, I
am sure you have some references on hand for that? Usually, a lot of
decisions regarding KDE is made based on a meritocracy-like system,
»nasty politiking« isn't
so:
The syntax is too ugly, i don't know how you call it sugar :)
If you take a look at Fortress you may see how much they use that kind of
syntax. And they are able to convert the ASCII code into more elegant pages
that use special chars. It's a clean syntax, I think it has no corner cases,
On 07/10/2010 15:22, Steven Schveighoffer wrote:
snip
The problem is with generic code. Generic code that accepts some type
that defines the in operator. What can that generic code expect for
performance when using in? As a general rule, generic programming must
always assume the worst case, and
http://en.wikipedia.org/wiki/Definite_assignment_analysis
By the way, I forgot to add that Definite assignment analysis is a (nice)
special case of typestate, that I was talking about recently.
Bye,
bearophile
Seth Hoenig wrote:
2010/10/8 Jérôme M. Berger jeber...@free.fr
Steven Schveighoffer wrote:
On Thu, 07 Oct 2010 16:23:47 -0400, Rainer Deyke rain...@eldwood.com
wrote:
I can't say I've ever cared about the big-O complexity of an operation.
Then you don't understand how important it is.
On 08/10/2010 00:39, Tomek Sowiński wrote:
snip
What's the halting problem?
Basically, it's the challenge of determining algorithmically whether an
arbitrary algorithm given arbitrary input will eventually halt or carry
on running forever.
The point is that the halting problem is known to
On 9/10/10 3:11 PM, Stewart Gordon wrote:
Personally, I think it's a shame that the halting problem can't be
solved. If it could, we could use it to solve many mathematical problems
that have as it happens remained unsolved for centuries.
But solving those problems would mean nothing in that
On Sat, 09 Oct 2010 10:56:45 +0100
Russel == Russel Winder wrote:
Russel I thought Waf did zipfiles as well, SCons certainly does both.
Correct.
Default in Waf is bzip2, with the support for gzip zip.
Russel Is there a need for anything else beyond those?
Not really.
Sincerely,
Gour
--
On Sat, 09 Oct 2010 10:19:50 +0100
Russel == Russel Winder wrote:
Russel Personally I am principally an Emacs and command line person so
Russel IDE is low on my agenda, though I use SCons as my build tool
Russel when using Eclipse/CDT. SCons has the capability if creating
Russel Visual Studio
On Sat, 9 Oct 2010 12:06:46 +0200
Jens == Jens Mueller wrote:
Jens Wow. They have excellent documentation.
Indeed. I'm just reading it.
Jens Only finds a program, right? I'd like to find a library. I.e. I
Jens need the path to the header files and the library files. I'll
Jens guess there is
On Sat, 09 Oct 2010 11:30:44 +0100
Russel == Russel Winder wrote:
Russel Can you keep me informed about the result? Just curious which
Russel features influenced your final decision.
Russel
Russel I'd love to know as well. All too often people make decisions
Russel and the decision gets
On 10/9/10 9:05 CDT, Jérôme M. Berger wrote:
Seth Hoenig wrote:
2010/10/8 Jérôme M. Bergerjeber...@free.fr
Steven Schveighoffer wrote:
On Thu, 07 Oct 2010 16:23:47 -0400, Rainer Deykerain...@eldwood.com
wrote:
I can't say I've ever cared about the big-O complexity of an operation.
Then you
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that it can be improved in a number of
ways (i.e. randomized, median-of-3, median-of-5, etc).
Isn't median of 3 a better default?
Bye,
bearophile
On 9/10/10 4:53 PM, bearophile wrote:
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that it can be improved in a number of
ways (i.e. randomized, median-of-3, median-of-5, etc).
Isn't median of 3 a better default?
Bye,
On 10/9/10 11:23 CDT, Peter Alexander wrote:
On 9/10/10 4:53 PM, bearophile wrote:
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that it can be improved in a number of
ways (i.e. randomized, median-of-3, median-of-5, etc).
Peter Alexander Wrote:
On 9/10/10 4:53 PM, bearophile wrote:
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that it can be improved in a number of
ways (i.e. randomized, median-of-3, median-of-5, etc).
Isn't median of
On 9/10/10 5:25 PM, Andrei Alexandrescu wrote:
On 10/9/10 11:23 CDT, Peter Alexander wrote:
On 9/10/10 4:53 PM, bearophile wrote:
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that it can be improved in a
number of
ways (i.e.
This must have been answered many times already but i shamelessly ask once
again..
What is the problem with :
[a, b, [c, d], e...]
At first glance it doesn't have the cases braces have and it looks much
better.
Thanks!
On Sat, 09 Oct 2010 16:08:17 +0300, bearophile
Just to be clear about this, the halting problem is only unsolvable for Turing
machines.
That is, a machine with a tape that extends or is indefinitely extensible to
the right.[wikipedia:Turing machine]
In the more general limited-memory setup it is actually quite simple to solve
the Halting
so s...@so.do wrote:
This must have been answered many times already but i shamelessly ask
once again..
What is the problem with :
[a, b, [c, d], e...]
At first glance it doesn't have the cases braces have and it looks much
better.
Uhm, it's an array? That is, the syntax is already
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky a...@a.a wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No other form makes any sence as a property. Frankly,
Hahaa! Thanks for quick answer. I sometimes forget this is D, not C.
On Sat, 09 Oct 2010 21:27:29 +0300, Simen kjaeraas
simen.kja...@gmail.com wrote:
so s...@so.do wrote:
This must have been answered many times already but i shamelessly ask
once again..
What is the problem with :
[a,
A possible enhancement for Contract Programming:
http://d.puremagic.com/issues/show_bug.cgi?id=5027
This is not meant as a replacement for old (that allows to refer to the state
at the entry to the instance method).
Bye,
bearophile
%u e...@ee.com wrote:
Just to be clear about this, the halting problem is only unsolvable for
Turing
machines.
That is, a machine with a tape that extends or is indefinitely
extensible to
the right.[wikipedia:Turing machine]
In the more general limited-memory setup it is actually quite
On 10/9/10 11:52 CDT, Sean Kelly wrote:
Andrei Alexandrescu Wrote:
In fact, guards can be put to ensure that the _expected_ (not average,
not best-case) complexity is O(n log n). This makes the risk of hitting
a worst-case scenario negligible in a principled manner.
On Tue, 05 Oct 2010 19:26:58 -0400
Jesse == Jesse Phillips wrote:
Jesse But I can not state that cross-platform GUI is available for D
Jesse at this time.
Despite of that we've decided to take a risk and choose with D
(hopefully it will become ready) QtD.
Thanks to all who replied and see you
On 10/9/10 12:12 CDT, Peter Alexander wrote:
On 9/10/10 5:25 PM, Andrei Alexandrescu wrote:
On 10/9/10 11:23 CDT, Peter Alexander wrote:
On 9/10/10 4:53 PM, bearophile wrote:
Andrei:
Currently std.algorithm.getPivot picks the middle of the range as the
pivot, but I made it modular such that
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky a...@a.a wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky a...@a.a wrote:
Ugh, it seems D still doesn't quite understand the concept of a property.
Here:
@property int foo() // Obviously getter
@property void foo(int x) // Obviously setter
No
I've been having fun with ranges lately. While nesting computing ranges I
noticed only the
outermost range's cache is necessary; there's no way of accessing front() of
ranges deeper
in the expression twice because they are sealed by the outermost range. Example:
map!a._0 + a._1(// caches,
Gour D. wrote:
Walter Few things work better than customers letting a company know
Walter they are interested in such-and-such a product.
Even a non-paying customer in the open-source world?
At least it shows interest. No emails tells the open source developer nobody
cares, so I'll just
On Sat, 09 Oct 2010 23:37:51 +0400, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
On 10/9/10 13:33 CDT, Steven Schveighoffer wrote:
On Fri, 08 Oct 2010 16:56:14 -0400, Nick Sabalausky a...@a.a wrote:
Ugh, it seems D still doesn't quite understand the concept of a
property.
bearophile napisał:
The ghost fields may be used to store partial computations useful to reduce
the work done
by the class invariant.
You can do:
class C {
version(unittest) int temp;
invariant() {
// use temp
}
}
Or am I missing something?
--
Tomek
On 10/09/2010 09:38 PM, Tomek Sowiński wrote:
I've been having fun with ranges lately. While nesting computing ranges I
noticed only the
outermost range's cache is necessary; there's no way of accessing front() of
ranges deeper
in the expression twice because they are sealed by the outermost
== Quote from Simen kjaeraas (simen.kja...@gmail.com)'s article
%u e...@ee.com wrote:
Just to be clear about this, the halting problem is only unsolvable for
Turing
machines.
That is, a machine with a tape that extends or is indefinitely
extensible to
the right.[wikipedia:Turing
On 9/10/10 8:58 PM, Pelle wrote:
How about never having caches and if you need them, you can get a
cached(map(..etc..))?
I do not understand where the notion that ranges should have caches come
from. It destroys the possibility for using const and complicates the
writing of them.
I agree with
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity here.
Given a function:
@property int foo(int x)
Is this a global setter or
Pelle napisał:
On 10/09/2010 09:38 PM, Tomek Sowiński wrote:
I've been having fun with ranges lately. While nesting computing ranges I
noticed only the outermost range's cache is necessary; there's no way of
accessing front() of ranges deeper in the expression twice because they
are sealed
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly s...@invisibleduck.org
wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC syntax for properties on d.learn, and I
realized, we have a huge ambiguity
Tomek S.:
You can do:
class C {
version(unittest) int temp;
invariant() {
// use temp
}
}
Or am I missing something?
D2 has several ways to perform conditional compilation, so you may implement
hand-made ghost fields using a version(debug). And ghost fields are very
On Sat, 09 Oct 2010 23:51:44 +0400, Tomek Sowiński j...@ask.me wrote:
bearophile napisał:
The ghost fields may be used to store partial computations useful to
reduce the work done
by the class invariant.
You can do:
class C {
version(unittest) int temp;
invariant() {
// use temp
And ghost fields are very important to start with (I was not sure to submit
an enhancement request).
Sorry, I meant, 'And ghost fields aren't very important to start with'.
Bye,
bearophile
bearophile napisał:
Tomek S.:
You can do:
class C {
version(unittest) int temp;
invariant() {
// use temp
}
}
Or am I missing something?
D2 has several ways to perform conditional compilation, so you may
implement hand-made ghost fields using a version(debug). And
Peter Alexander napisał:
On 9/10/10 8:58 PM, Pelle wrote:
How about never having caches and if you need them, you can get a
cached(map(..etc..))?
I do not understand where the notion that ranges should have caches come
from. It destroys the possibility for using const and complicates the
Gour D. g...@atmarama.net wrote:
On Tue, 05 Oct 2010 19:26:58 -0400
Jesse == Jesse Phillips wrote:
Jesse But I can not state that cross-platform GUI is available for D
Jesse at this time.
Despite of that we've decided to take a risk and choose with D
(hopefully it will become ready) QtD.
On 9/10/10 10:06 PM, Tomek Sowiński wrote:
How can I contribute that to Phobos?
I believe you have been accepted as a trusted commiter by some people
(Walter and Andrei?). Most people appear to earn trust by writing a high
quality library.
On 10/9/10 14:38 CDT, Tomek Sowiński wrote:
I've been having fun with ranges lately. While nesting computing ranges I
noticed only the
outermost range's cache is necessary; there's no way of accessing front() of
ranges deeper
in the expression twice because they are sealed by the outermost
On 10/9/10 15:12 CDT, Peter Alexander wrote:
On 9/10/10 8:58 PM, Pelle wrote:
How about never having caches and if you need them, you can get a
cached(map(..etc..))?
I do not understand where the notion that ranges should have caches come
from. It destroys the possibility for using const and
On 10/9/10 16:06 CDT, Tomek Sowiński wrote:
Peter Alexander napisał:
On 9/10/10 8:58 PM, Pelle wrote:
How about never having caches and if you need them, you can get a
cached(map(..etc..))?
I do not understand where the notion that ranges should have caches come
from. It destroys the
Peter Alexander:
I believe you have been accepted as a trusted commiter by some people
(Walter and Andrei?). Most people appear to earn trust by writing a high
quality library.
Right. While DMD is currently NOT managed as a true Open Source project (and
this is very bad for the future and
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
On 10/9/10 14:38 CDT, Tomek Sowiński wrote:
I've been having fun with ranges lately. While nesting computing ranges I
noticed only the
outermost range's cache is necessary; there's no way of accessing front() of
On 9/10/10 11:40 PM, Andrei Alexandrescu wrote:
I think it's a good idea. In fact let's eliminate caching altogether; it
does not happen for the random access operator anyway and I think it's
fair to simply evaluate the function whenever an element is accessed.
Whaddaya think?
Andrei
Yep,
On 10/9/10 18:20 CDT, dsimcha wrote:
Vote++. When I added bidirectional support for map(), I felt like any solution
for doing bidirectional caching was going to suck. I considered just
eliminating
it, but left it because at the time I was more interested in just getting
bidirectional/random
On Sat, Oct 9, 2010 at 9:11 AM, Stewart Gordon smjg_1...@yahoo.com wrote:
On 08/10/2010 00:39, Tomek Sowiński wrote:
snip
What's the halting problem?
Basically, it's the challenge of determining algorithmically whether an
arbitrary algorithm given arbitrary input will eventually halt or
On Saturday 09 October 2010 06:54:31 Stewart Gordon wrote:
On 07/10/2010 15:22, Steven Schveighoffer wrote:
snip
The problem is with generic code. Generic code that accepts some type
that defines the in operator. What can that generic code expect for
performance when using in? As a
On whatever page(s) on digitalmars.com or d-programming-language.com refer
to the newsgroups, there should probably be a note (with a link) indicating
that bug reports should be posted to bug tracker rather than the NG. And
also that digitalmars.D.bugs is just a mirror for the issues on the
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin 2kor...@gmail.com
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly s...@invisibleduck.org
wrote:
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
On 10/8/10 7:55 CDT, Steven Schveighoffer wrote:
Someone was asking about UFC
On 10/10/2010 12:44 PM, Jordi wrote:
I am happy with D2, my project already surpasses de 200K non-blank lines
of code, and i am even considering going commercial with it.
Sorry, shameful mistake with my shell script skills. It is 50K lines :|
j.
On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin 2kor...@gmail.com
wrote:
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques sandf...@jhu.edu
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin 2kor...@gmail.com
wrote:
On Sun, 10 Oct 2010 00:09:23 +0400, Sean Kelly
On Sun, 10 Oct 2010 08:44:59 +0400, Robert Jacques sandf...@jhu.edu
wrote:
On Sat, 09 Oct 2010 22:03:56 -0400, Denis Koroskin 2kor...@gmail.com
wrote:
On Sun, 10 Oct 2010 05:58:00 +0400, Robert Jacques sandf...@jhu.edu
wrote:
On Sat, 09 Oct 2010 16:28:32 -0400, Denis Koroskin
Gour D. wrote:
Heh...I remember Zortech coming with tons of nicely printed
documentation in grey hardbox...That was the golden are of docs. ;)
When the doc books got to be a yard thick, fortunately CD-ROMs arrived just in
time!
On Sat, 09 Oct 2010 07:16:10 +0400, bearophile bearophileh...@lycos.com
wrote:
This is a simple D2 class that uses Contracts:
import std.c.stdio: printf;
class Car {
int speed = 0;
invariant() {
printf(Car invariant: %d\n, speed);
assert(speed = 0);
}
On Saturday 09 October 2010 03:09:30 Denis Koroskin wrote:
Given that pre-, post-conditions and invariants are all pure, it doesn't
really matter in what order they are executed.
In effect yes, but they aren't actually pure. If they were, you couldn't use
stuff
like writeln() in them.
On Sat, 09 Oct 2010 14:20:18 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 03:09:30 Denis Koroskin wrote:
Given that pre-, post-conditions and invariants are all pure, it doesn't
really matter in what order they are executed.
In effect yes, but they aren't
On Saturday 09 October 2010 03:25:48 Denis Koroskin wrote:
Well, I meant they are conceptually pure.
Yes, they are conceptually pure, just not actually pure.
But do believe you shouldn't be able to use writeln in code like that. Why
would you do it anyway? It's more or less like using assert
On Sat, 09 Oct 2010 14:44:41 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 03:25:48 Denis Koroskin wrote:
Well, I meant they are conceptually pure.
Yes, they are conceptually pure, just not actually pure.
But do believe you shouldn't be able to use writeln
On Saturday 09 October 2010 03:47:52 Denis Koroskin wrote:
Why not just throw an exception and get a nice stack trace?
You get a stack trace anyway with an assertion failure. And sure, they _could_
make it so that the only way to output anything from a contract is to use an
exception, but not
On Sat, 09 Oct 2010 15:06:40 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 03:47:52 Denis Koroskin wrote:
Why not just throw an exception and get a nice stack trace?
You get a stack trace anyway with an assertion failure. And sure, they
_could_
make it so
On Saturday 09 October 2010 04:23:25 Denis Koroskin wrote:
On Sat, 09 Oct 2010 15:06:40 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 03:47:52 Denis Koroskin wrote:
Why not just throw an exception and get a nice stack trace?
You get a stack trace
On Sat, 09 Oct 2010 15:32:26 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 04:23:25 Denis Koroskin wrote:
On Sat, 09 Oct 2010 15:06:40 +0400, Jonathan M Davis
jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 03:47:52 Denis Koroskin wrote:
Why not
On Saturday 09 October 2010 04:49:08 Denis Koroskin wrote:
On Sat, 09 Oct 2010 15:32:26 +0400, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Saturday 09 October 2010 04:23:25 Denis Koroskin wrote:
On Sat, 09 Oct 2010 15:06:40 +0400, Jonathan M Davis
jmdavisp...@gmx.com
wrote:
On
Jonathan M Davis:
What's odder is that the invariant is run after the
precondition. That shouldn't be necessary, since any changes to the object
would
have been verifed after the last time that a public member function was
called.
They may contain different tests.
Bye,
bearophile
Denis Koroskin:
Why do you think Walter disallowed throwing from
contracts (other than asserts) in first place?
Probably because exceptions have no place in contracts. If a contract fails,
the program is buggy, and it needs to stop. Contracts need to contain logical
expressions that need
On Saturday 09 October 2010 06:02:52 bearophile wrote:
Jonathan M Davis:
What's odder is that the invariant is run after the
precondition. That shouldn't be necessary, since any changes to the
object would have been verifed after the last time that a public member
function was called.
Jonathan M Davis:
if the state couldn't have changed since the last public function call, the
running
the invariant before the function call is pointless.
The post-condition of a method doesn't need to make sure the class is in a
correct state, all it has to test is that its output
bearophile wrote:
Jonathan M Davis:
if the state couldn't have changed since the last public function call, the
running
the invariant before the function call is pointless.
The post-condition of a method doesn't need to make sure the class is in a
correct state, all it has to test is
J. Berger:
Jonathan's point is not about running the post-condition and the
invariant. It is about running the invariant twice: both before and
after the function. This is completely independent from any pre- or
post-conditions there may be.
You are missing something still.
C = a
bearophile wrote:
J. Berger:
Jonathan's point is not about running the post-condition and the
invariant. It is about running the invariant twice: both before and
after the function. This is completely independent from any pre- or
post-conditions there may be.
You are missing
J. Berger:
This is more or less what Jonathan said in his last post.
You are right, if the state isn't changed between two method calls, there's no
point in calling the invariant two times after the method call and before the
next method call.
Bye,
bearophile
Incomplete mixin expression + char[] to char assignment = crash :)
--
char[] foo()
{
char[2] res = 1 ;
res[1] = ;; // should be a char
return res;
}
struct S(T)
{
int i = mixin( foo() ); // incomplete mixin expression
}
S!(int) s;
--
Assertion failure: '0' on line 1342 in file
1 - 100 of 125 matches
Mail list logo