Missing python-like chaining in D

forkit forkit at gmail.com
Mon Feb 21 10:27:08 UTC 2022


On Monday, 21 February 2022 at 09:48:53 UTC, Stanislav Blinov 
wrote:
> On Monday, 21 February 2022 at 09:29:56 UTC, forkit wrote:
>> It seems to me, that D is a language where python like 
>> chaining would be right at home.
>>
>> writeln(1 < 2 < 3 < 4 > 3 == 3); // true
>>
>
> I've no clue whatsoever how to interpret that mess, nor do I 
> have any desire of obtaining said clue.

It's just a chain..

just like...

cat.meow().eat().sleep().play();

which, the more verbose way, is:

cat.meow();
cat.eat();
cat.sleep();
cat.play();



More information about the Digitalmars-d mailing list