On 24.5.2013. 1:58, bearophile wrote:
Peter Alexander:
What about code that relies on overflow? It's well-defined behaviour,
so it should be expected that people rely on it (I certainly do
sometimes)
Do you rely on signed or unsigned overflow?
My opinions on this topic have changed few times
Good that we talked about it.
--
Marco
A)
Requiring a construct such as Checked!int is too complicated for the user
in general as it requires a lot of code change from the user. It may be
useful in certain cases but overflow bugs will crop up in unexpected places.
B)
To help finding such bugs, introduce a special version identifier for
Am Fri, 24 May 2013 01:35:42 +0200
schrieb "Peter Alexander" :
> What about code that relies on overflow? It's well-defined
> behaviour, so it should be expected that people rely on it (I
> certainly do sometimes)
See my post about Delphi's approach. It could be disabled in D
using pragma(), UD
Peter Alexander:
What about code that relies on overflow? It's well-defined
behaviour, so it should be expected that people rely on it (I
certainly do sometimes)
Do you rely on signed or unsigned overflow?
My opinions on this topic have changed few times.
A modern system language should off
On Saturday, 18 May 2013 at 20:29:57 UTC, Minas Mina wrote:
I agree that checks for overflow should exist in debug builds
(and not exist in release builds).
What about code that relies on overflow? It's well-defined
behaviour, so it should be expected that people rely on it (I
certainly do so
Am Thu, 23 May 2013 19:55:36 +0200
schrieb luka8088 :
> I understand perfectly the issue that you are pointing out. But that is
> not the real issue here. I know how computer arithmetic works, the
> understanding is not the issue here. The real issue is that at the time
> of writing unsigned wa
On 17.5.2013. 0:23, Marco Leise wrote:
Am Thu, 16 May 2013 22:39:16 +0200
schrieb luka8088:
On 16.5.2013. 22:29, Andrej Mitrovic wrote:
On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.
I agree that checks for overflow should exist in debug builds
(and not exist in release builds).
Am Fri, 17 May 2013 14:43:08 -0300
schrieb Ary Borenszweig :
> On 5/16/13 5:24 PM, luka8088 wrote:
> > Hello everyone.
> >
> > Today I ran into a interesting issue. I wrote
> >
> >auto offset = text1.length - text2.length;
> >
> > and in case text2 was longer then text1 I got something around
On 5/16/13 5:24 PM, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
and in case text2 was longer then text1 I got something around 4294967291.
So I opened an issue:
http://d.puremagic.com/issues/show_bug.cgi?id=10093
On Thu, 16 May 2013 23:23:20 +0100, Marco Leise wrote:
Am Thu, 16 May 2013 22:39:16 +0200
schrieb luka8088 :
On 16.5.2013. 22:29, Andrej Mitrovic wrote:
> On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
>> Hello everyone.
>>
>> Today I ran into a interesting issue. I wrote
>>
>> aut
Am Thu, 16 May 2013 22:39:16 +0200
schrieb luka8088 :
> On 16.5.2013. 22:29, Andrej Mitrovic wrote:
> > On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
> >> Hello everyone.
> >>
> >> Today I ran into a interesting issue. I wrote
> >>
> >> auto offset = text1.length - text2.length;
> >
>
On 05/16/2013 04:17 PM, Mr. Anonymous wrote:
> On Thursday, 16 May 2013 at 21:04:38 UTC, Jonathan M Davis wrote:
>> On Thursday, May 16, 2013 22:42:23 luka8088 wrote:
>>> I agree that it is exactly the same as checking if (text1.length >
>>> text2.length). And I don't think that this is an issues i
On Thursday, 16 May 2013 at 21:04:38 UTC, Jonathan M Davis wrote:
On Thursday, May 16, 2013 22:42:23 luka8088 wrote:
I agree that it is exactly the same as checking if
(text1.length >
text2.length). And I don't think that this is an issues if you
are aware
of the fact that you are working with
On 5/16/13, Jonathan M Davis wrote:
> The hardware doesn't support it, and it would definitely
> be slow if it were added.
We could add it in -debug mode perhaps. Ideally this sort of thing
would be its own switch, but yes that goes towards switch
proliferation, I know the story.
On Thursday, May 16, 2013 22:42:23 luka8088 wrote:
> I agree that it is exactly the same as checking if (text1.length >
> text2.length). And I don't think that this is an issues if you are aware
> of the fact that you are working with unsigned values. But in the code
> that I wrote there was no men
On 16.5.2013. 22:35, Mr. Anonymous wrote:
On Thursday, 16 May 2013 at 20:29:13 UTC, Andrej Mitrovic wrote:
On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
Yeah, I don't like th
On 16.5.2013. 22:29, Andrej Mitrovic wrote:
On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
Yeah, I don't like these bugs either. In the meantime you can swap auto
with 'sizedif
On Thursday, 16 May 2013 at 20:29:13 UTC, Andrej Mitrovic wrote:
On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
Yeah, I don't like these bugs either. In the meantime you can
On Thursday, 16 May 2013 at 20:24:31 UTC, luka8088 wrote:
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
Yeah, I don't like these bugs either. In the meantime you can
swap auto with 'sizediff_t' or 'ptrdiff_t', and then you can
che
Hello everyone.
Today I ran into a interesting issue. I wrote
auto offset = text1.length - text2.length;
and in case text2 was longer then text1 I got something around 4294967291.
So I opened an issue:
http://d.puremagic.com/issues/show_bug.cgi?id=10093
I know that there is a perfectly vali
22 matches
Mail list logo