Re: and/or/not/xor operators

2013-06-05 Thread Regan Heath
On Tue, 04 Jun 2013 23:47:07 +0100, ixid nuacco...@gmail.com wrote: On Monday, 3 June 2013 at 09:29:20 UTC, Regan Heath wrote: On Fri, 31 May 2013 21:26:56 +0100, ixid nuacco...@gmail.com wrote: We really don't want D to become a TMTOWTDI language. Ideally there should be 1 right way and

Re: and/or/not/xor operators

2013-06-05 Thread John Colvin
On Wednesday, 5 June 2013 at 09:02:44 UTC, Regan Heath wrote: On Tue, 04 Jun 2013 23:47:07 +0100, ixid nuacco...@gmail.com wrote: On Monday, 3 June 2013 at 09:29:20 UTC, Regan Heath wrote: On Fri, 31 May 2013 21:26:56 +0100, ixid nuacco...@gmail.com wrote: We really don't want D to become

Re: and/or/not/xor operators

2013-06-04 Thread ixid
On Monday, 3 June 2013 at 09:29:20 UTC, Regan Heath wrote: On Fri, 31 May 2013 21:26:56 +0100, ixid nuacco...@gmail.com wrote: We really don't want D to become a TMTOWTDI language. Ideally there should be 1 right way and no alternatives. That way, anyone who knows D will have a greater

Re: and/or/not/xor operators

2013-06-03 Thread Regan Heath
On Fri, 31 May 2013 21:26:56 +0100, ixid nuacco...@gmail.com wrote: We really don't want D to become a TMTOWTDI language. Ideally there should be 1 right way and no alternatives. That way, anyone who knows D will have a greater chance of knowing what any given code sample does, and not

Re: and/or/not/xor operators

2013-05-31 Thread Regan Heath
On Fri, 31 May 2013 02:41:14 +0100, Shriramana Sharma samj...@gmail.com wrote: Thanks to all who replied. On Thu, May 30, 2013 at 10:18 PM, bearophile bearophileh...@lycos.com wrote: But Walter refused them time ago on the basis that no one uses them in C++. So you can ask for them in

Re: and/or/not/xor operators

2013-05-31 Thread Minas Mina
On Thursday, 30 May 2013 at 16:48:33 UTC, bearophile wrote: Shriramana Sharma: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. and/or/not are less visually noisy, they look better than the ugly /||/!

Re: and/or/not/xor operators

2013-05-31 Thread bearophile
Regan Heath: I find them ugly and less clear - because I can glance at words symbols and immediately see the operator, faster than with words and symbols. Finding a short, common and easy to write English word ugly is quite strange, especially for a person that seems able to write in

Re: and/or/not/xor operators

2013-05-31 Thread Shriramana Sharma
On Fri, May 31, 2013 at 4:12 PM, Minas Mina minas_mina1...@hotmail.co.uk wrote: They are more noisy for non-English talking persons. Um and the rest of the D keywords are in what language?! -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

Re: and/or/not/xor operators

2013-05-31 Thread John Colvin
On Friday, 31 May 2013 at 10:21:19 UTC, Regan Heath wrote: Until this thread I didn't even know they existed.. Same. I use them every day in python, but I had no idea they were in C++ Tbh they annoy me in python, although that's just my C background showing.

Re: and/or/not/xor operators

2013-05-31 Thread ixid
We really don't want D to become a TMTOWTDI language. Ideally there should be 1 right way and no alternatives. That way, anyone who knows D will have a greater chance of knowing what any given code sample does, and not have to look up alternate syntax etc. R Up to a point I'd certainly

and/or/not/xor operators

2013-05-30 Thread Shriramana Sharma
Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. Isn't this possible in D? I tried doing: alias and ; import std.stdio ; void main () { writeln ( true and true ) ; } but I get errors: $ dmd foo.d

Re: and/or/not/xor operators

2013-05-30 Thread Iain Buclaw
On Thursday, 30 May 2013 at 16:18:44 UTC, Shriramana Sharma wrote: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. Isn't this possible in D? I tried doing: No, it isn't available... Thank goodness! :)

Re: and/or/not/xor operators

2013-05-30 Thread Simen Kjaeraas
On 2013-05-30, 13:56, Shriramana Sharma wrote: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. Isn't this possible in D? I tried doing: alias and ; import std.stdio ; void main () { writeln ( true

Re: and/or/not/xor operators

2013-05-30 Thread bearophile
Shriramana Sharma: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. and/or/not are less visually noisy, they look better than the ugly /||/! of C/C++/D, and it's much less easy to write when you need

Re: and/or/not/xor operators

2013-05-30 Thread ixid
On Thursday, 30 May 2013 at 16:30:12 UTC, Iain Buclaw wrote: On Thursday, 30 May 2013 at 16:18:44 UTC, Shriramana Sharma wrote: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. Isn't this possible in D? I

Re: and/or/not/xor operators

2013-05-30 Thread John Colvin
On Thursday, 30 May 2013 at 16:18:44 UTC, Shriramana Sharma wrote: Hello. I have always loved the readability of C++'s and/or/not/xor word-like logical operators but It doesn't seem to be available in D. Isn't this possible in D? I tried doing: alias and ; import std.stdio ; void main () {

Re: and/or/not/xor operators

2013-05-30 Thread Shriramana Sharma
Thanks to all who replied. On Thu, May 30, 2013 at 10:18 PM, bearophile bearophileh...@lycos.com wrote: But Walter refused them time ago on the basis that no one uses them in C++. So you can ask for them in the main D newsgroup, but I don't think you will see them in D... Um why really? No

Re: and/or/not/xor operators

2013-05-30 Thread Ali Çehreli
On 05/30/2013 06:41 PM, Shriramana Sharma wrote: no one uses?!!! I use, for one. Are there others in the team? Without getting into the argument of whether they are useful, you are the first person that I know who uses them. :) I have been programming in C since 1988 and in C++ since 1997.

Re: and/or/not/xor operators

2013-05-30 Thread bearophile
Shriramana Sharma: Um why really? No one uses them in C++? How come? I agree that Walter has succesfully produced/marketed a C++ compiler for a long time, but really, no one uses?!!! I use, for one. And it does tremendously increase the readability of a program. Otherwise why would there be

Re: and/or/not/xor operators

2013-05-30 Thread bearophile
Ali Çehreli: I don't have a preference on the topic but it would still be incomplete, right? There are many other operators that don't have keywords. Beside the || ! I think it's much better to not replace the other operators with keywords. Perhaps that's why not many people use them.