February 22, 2022
On 2/22/22 06:42, Dom DiSc wrote:

> and if the chain gets longer, even more complicated:
>
> a > b > c <= d
>
> will  be lowered to
>
> auto tmp1 = b;
> auto tmp2 = c;
> a > tmp1 && tmp1 > tmp2 && tmp2 <= d
>
> and so on.

No, it is a little more complicated than that. Unlike your equivalent, Python evaluates c only if a > tmp1 is true.

Ali

February 22, 2022
On Tuesday, 22 February 2022 at 15:07:12 UTC, Stanislav Blinov wrote:
>
> Thanks, I most certainly will. Didn't know I needed your permission, but still, thanks!
>
> I sometimes wonder if it's something in the air or what?..

no. sorry. but again, you're confused.

'something in the air' is actually a hit song from 1969.

it has nothing to do with maths.

February 22, 2022
On 2/22/2022 2:05 PM, forkit wrote:
> no. sorry. but again, you're confused.

Please refrain from calling others confused. It's impolite, and besides, there's always the embarassing risk that the caller is confused, not the callee.
February 23, 2022
On 22.02.22 16:07, Stanislav Blinov wrote:
> On Tuesday, 22 February 2022 at 13:08:17 UTC, Timon Gehr wrote:
>> On 2/22/22 10:00, Stanislav Blinov wrote:
>>>
>>> I do know what it means in math (though wouldn't call it "standard")
>>
>> You are more likely than not to find that convention in play in any at least half-serious mathematical publication, but feel free not to call it what it is.
> 
> ... Didn't know I needed your permission, ...
> ...

You don't. I was simply expressing bewilderment at seemingly deliberately ineffective communication.

Anyway, it's pretty clear that this won't be in D, though I encourage anyone who is interested to browse other random math-related Wikipedia articles and see that the notation is indeed commonly used and essentially never with any further explanations or references.

E.g., see here: https://en.wikipedia.org/wiki/Azuma%27s_inequality#Proof_2

I.e., it is standard. I think calling this into question is not of particular value.

> 
> I sometimes wonder if it's something in the air or what?.. 

I hope not. Get well soon.
February 23, 2022
On 22.02.22 11:47, Patrick Schluter wrote:
> On Tuesday, 22 February 2022 at 10:28:56 UTC, forkit wrote:
>> On Tuesday, 22 February 2022 at 09:00:10 UTC, Stanislav Blinov wrote:
>>>
>>> Call it a habit, although I'd say it's more of an allergy to error-prone practices.
>>
>> c'mon. all other matters aside...
>>
>> ..you can't deny, that there is beauty in this mess.
>>
>> 1 < 2 < 3 < 4 > 3 == 3
> 
> Nope.

Indeed, it's not a particularly helpful motivating example. x)

I have sometimes wished for this when checking that some more complicated expression is within some bounds, where the expression is not complicated enough to justify reshaping the code and introducing a temporary variable.

e.g.: low <= a[2*i+1] <= high
vs:   low <= a[2*i+1] && a[2*i+1] <= high
February 22, 2022
On Wed, Feb 23, 2022 at 02:03:37AM +0100, Timon Gehr via Digitalmars-d wrote:
> On 22.02.22 11:47, Patrick Schluter wrote:
[...]
> > > ..you can't deny, that there is beauty in this mess.
> > > 
> > > 1 < 2 < 3 < 4 > 3 == 3
> > 
> > Nope.
> 
> Indeed, it's not a particularly helpful motivating example. x)
> 
> I have sometimes wished for this when checking that some more complicated expression is within some bounds, where the expression is not complicated enough to justify reshaping the code and introducing a temporary variable.
> 
> e.g.: low <= a[2*i+1] <= high
> vs:   low <= a[2*i+1] && a[2*i+1] <= high

	import std.algorithm : ordered;
	if (ordered(low, a[2*i+1], high)) ...


T

-- 
What do you call optometrist jokes? Vitreous humor.
February 23, 2022
On Tuesday, 22 February 2022 at 22:48:59 UTC, Walter Bright wrote:
> On 2/22/2022 2:05 PM, forkit wrote:
>> no. sorry. but again, you're confused.
>
> Please refrain from calling others confused. It's impolite, and besides, there's always the embarassing risk that the caller is confused, not the callee.

seriously? This was just dry humour (which should have been immensely apparent).

It was not an attempt to be impolite.

what's the online world coming too.. jeessssee....
February 23, 2022
On Tuesday, 22 February 2022 at 15:07:12 UTC, Stanislav Blinov wrote:
>
> Thanks, I most certainly will. Didn't know I needed your permission, but still, thanks!
>
> I sometimes wonder if it's something in the air or what?..

now this is not dry humour.

it is a form of mockery - intended to humiliate the recipient of such.

https://www.collinsdictionary.com/dictionary/english-thesaurus/mockery/2

interesting that Walter missed this??
February 23, 2022
On Tuesday, 22 February 2022 at 22:48:59 UTC, Walter Bright wrote:
> On 2/22/2022 2:05 PM, forkit wrote:
>> no. sorry. but again, you're confused.
>
> Please refrain from calling others confused. It's impolite, and besides, there's always the embarassing risk that the caller is confused, not the callee.

and in any case, the callee is confused, as the composition I presented, although intentionally an unintuitive one, is a standard form in mathmatics.

so lets now be clear, on who is confused, and who isn't.

and to suggest that confusion is == humiliation, is a ridiculous propostion in any case.

we are all confused, all the time. it's why we have a brain.. to work through the confusion.


February 23, 2022
On Tuesday, 22 February 2022 at 09:00:10 UTC, Stanislav Blinov wrote:
>
>
> Call it a habit, although I'd say it's more of an allergy to error-prone practices.

I accept, that 'perhaps' less distain and *confusion* would have emerged, had I provided a more intuitive example of the concept..


void foo(int val) if(0 < val <= (4294967295 / 2))
{
    return val * 2;
}

..nonetheless...go ahead...destroy!