Re: Adding Unicode operators to D [use cases]

2008-10-29 Thread Don
Andrei Alexandrescu wrote: Sergey Gromov wrote: Don wrote: If you could completely ignore keyboard and display issues, and use any unicode character as an operator, which ones would you actually use? I'd use dot ⋅ and cross × products for 3D, union ∪ and intersection ∩, subset ⊂ and superset

Re: Adding Unicode operators to D [use cases]

2008-10-29 Thread Walter Bright
Andrei Alexandrescu wrote: * There is a way of specifying that precedence of a function defined as above is the same as precedence of a built-in operator. That throws out the ability to parse without semantic analysis. It's not worth it.

Re: Adding Unicode operators to D [use cases]

2008-10-29 Thread Andrei Alexandrescu
Walter Bright wrote: Andrei Alexandrescu wrote: * There is a way of specifying that precedence of a function defined as above is the same as precedence of a built-in operator. That throws out the ability to parse without semantic analysis. It's not worth it. It doesn't per a previous post

Re: Adding Unicode operators to D [use cases]

2008-10-28 Thread Sergey Gromov
Don wrote: If you could completely ignore keyboard and display issues, and use any unicode character as an operator, which ones would you actually use? I'd use dot ⋅ and cross × products for 3D, union ∪ and intersection ∩, subset ⊂ and superset ⊃ and their negative forms. I don't think I'd use

Re: Adding Unicode operators to D [use cases]

2008-10-28 Thread bearophile
Sergey Gromov: I'd use dot ⋅ and cross × products for 3D, union ∪ and intersection ∩, subset ⊂ and superset ⊃ and their negative forms. I don't think I'd use anything else. I just want to note that the whole thread is almost unreadable on the digitalmars.com/webnews/, because it

Re: Adding Unicode operators to D [use cases]

2008-10-28 Thread Bill Baxter
On Wed, Oct 29, 2008 at 4:12 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Sergey Gromov wrote: Don wrote: If you could completely ignore keyboard and display issues, and use any unicode character as an operator, which ones would you actually use? I'd use dot ⋅ and cross × products for

Re: Adding Unicode operators to D

2008-10-27 Thread Yigal Chripun
Bill Baxter wrote: On Sat, Oct 25, 2008 at 8:57 PM, Yigal Chripun [EMAIL PROTECTED] wrote: Steven Schveighoffer wrote: Bill Baxter wrote On Sat, Oct 25, 2008 at 6:37 AM, ore-sama [EMAIL PROTECTED] wrote: Bill Baxter Wrote: (like I haven't been able to figure out how to get the DOS console

Re: Adding Unicode operators to D

2008-10-27 Thread Sergey Gromov
Bill Baxter пишет: On Sat, Oct 25, 2008 at 10:37 AM, Benji Smith [EMAIL PROTECTED] wrote: Bill Baxter wrote: On Sat, Oct 25, 2008 at 10:23 AM, Benji Smith [EMAIL PROTECTED] wrote: Bill Baxter wrote: Anyone using a shell for Windows that works and supports UTF-8 properly? A regular Windows

Re: Adding Unicode operators to D

2008-10-26 Thread Bruno Medeiros
KennyTM~ wrote: Bruno Medeiros wrote: Simen Kjaeraas wrote: As an example, while I'd enjoy seeing code like this, I'm not sure I'd enjoy writing it (Note that I am prone to exaggerations): int a = ∅; //empty set, same as = void int[] b = [1,2,3,4,5,6]; a = readInt(); Hum, interesting

Re: Adding Unicode operators to D

2008-10-26 Thread KennyTM~
Bruno Medeiros wrote: Andrei Alexandrescu wrote: Spacen Jasset wrote: Bill Baxter wrote: On Thu, Oct 23, 2008 at 7:27 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Please vote up before the haters take it down, and discuss:

Re: Adding Unicode operators to D

2008-10-26 Thread KennyTM~
Andrei Alexandrescu wrote: Bruno Medeiros wrote: Andrei Alexandrescu wrote: Spacen Jasset wrote: Bill Baxter wrote: On Thu, Oct 23, 2008 at 7:27 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Please vote up before the haters take it down, and discuss:

Re: Adding Unicode operators to D

2008-10-26 Thread Simen Kjaeraas
On Mon, 27 Oct 2008 00:41:26 +0100, Bill Baxter [EMAIL PROTECTED] wrote: Same thing goes for downs' in-fix operators. I think his syntax is /infix/ which means that his ops always have the same precedence as division. I'm guessing this Python Cookbook recipe is very similar to Downs' technique.

Re: Adding Unicode operators to D

2008-10-26 Thread Bill Baxter
On Mon, Oct 27, 2008 at 9:04 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: What's the precedence of your user-defined in-fix operator? --bb Yup, I realized this myself as well. Seemed like such a great idea when I only thought of it for three seconds. :p An operator could always be

Re: Adding Unicode operators to D

2008-10-26 Thread Andrei Alexandrescu
Bill Baxter wrote: On Mon, Oct 27, 2008 at 11:43 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Bill Baxter wrote: On Mon, Oct 27, 2008 at 9:04 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: What's the precedence of your user-defined in-fix operator? --bb Yup, I realized this myself as

Re: Adding Unicode operators to D

2008-10-25 Thread bearophile
Bill Baxter: was actually more work than it would be to just use D for everything. Mixing languages isn't nice, I agree. That's why I too use D for several purposes. But if you have to change your code very often (and if your problems are of a certain kind that allow a natural vectorization),

Re: Adding Unicode operators to D

2008-10-24 Thread Simen Kjaeraas
On Fri, 24 Oct 2008 18:28:51 +0200, Bruno Medeiros [EMAIL PROTECTED] wrote: Andrei Alexandrescu wrote: Please vote up before the haters take it down, and discuss: http://www.reddit.com/r/programming/comments/78rjk/allowing_unicode_operators_in_d_similarly_to/ Andrei I'm unsure

Re: Adding Unicode operators to D

2008-10-24 Thread KennyTM~
Bruno Medeiros wrote: Simen Kjaeraas wrote: As an example, while I'd enjoy seeing code like this, I'm not sure I'd enjoy writing it (Note that I am prone to exaggerations): int a = ∅; //empty set, same as = void int[] b = [1,2,3,4,5,6]; a = readInt(); Hum, interesting example, it

Re: Adding Unicode operators to D

2008-10-24 Thread Bill Baxter
On Sat, Oct 25, 2008 at 9:15 AM, Sergey Gromov [EMAIL PROTECTED] wrote: Sat, 25 Oct 2008 06:43:19 +0900, Bill Baxter wrote: On Sat, Oct 25, 2008 at 6:37 AM, ore-sama [EMAIL PROTECTED] wrote: Bill Baxter Wrote: (like I haven't been able to figure out how to get the DOS console in Windows

Re: Adding Unicode operators to D

2008-10-23 Thread Max Samukha
On Wed, 22 Oct 2008 17:27:58 -0500, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Please vote up before the haters take it down, and discuss: http://www.reddit.com/r/programming/comments/78rjk/allowing_unicode_operators_in_d_similarly_to/ Andrei I'm already having problems with unicode: the

Re: Adding Unicode operators to D

2008-10-23 Thread Don
Bill Baxter wrote: On Thu, Oct 23, 2008 at 7:27 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Please vote up before the haters take it down, and discuss: http://www.reddit.com/r/programming/comments/78rjk/allowing_unicode_operators_in_d_similarly_to/ (My comment cross posted here from

Re: Adding Unicode operators to D

2008-10-23 Thread bearophile
Andrei Alexandrescu: Few random thoughts on the subject: - Someday probably programming languages will use some Unicode symbols. I don't know if Fortress will succeed, but I think someday some language will do. Probably Unicode symbols will be used as in Fotress, for improve the readability of

Re: Adding Unicode operators to D

2008-10-23 Thread davidl
在 Thu, 23 Oct 2008 06:42:32 +0800,Andrei Alexandrescu [EMAIL PROTECTED] 写道: Correx: http://www.reddit.com/r/programming/comments/78rmc/allowing_unicode_operators_in_d_similarly_to/ Andrei Andrei Alexandrescu wrote: Please vote up before the haters take it down, and discuss:

Re: Adding Unicode operators to D

2008-10-23 Thread Yigal Chripun
Max Samukha wrote: On Thu, 23 Oct 2008 04:23:29 -0700, Robert Fraser [EMAIL PROTECTED] wrote: bearophile wrote: - Python3 allows Unicode identifiers, mostly to allow people in all part of the world to write variable names in their languages. So does D. I'd like to note that identifiers

Re: Adding Unicode operators to D

2008-10-23 Thread bearophile
I always use English for variable names, instead of my language, because I've had my share of debugging code with variables in other languages and it's not a nice thing to do. Regarding Python code, its std libs keeps identifiers in English only, but when they have invented the

Re: Adding Unicode operators to D

2008-10-23 Thread Max Samukha
On Thu, 23 Oct 2008 08:33:16 -0400, bearophile [EMAIL PROTECTED] wrote: I always use English for variable names, instead of my language, because I've had my share of debugging code with variables in other languages and it's not a nice thing to do. Regarding Python code, its std libs keeps

Re: Adding Unicode operators to D

2008-10-22 Thread Moritz Warning
On Wed, 22 Oct 2008 23:37:43 +, Moritz Warning wrote: On Wed, 22 Oct 2008 17:27:58 -0500, Andrei Alexandrescu wrote: Please vote up before the haters take it down, and discuss: http://www.reddit.com/r/programming/comments/78rjk/ allowing_unicode_operators_in_d_similarly_to/

Re: Adding Unicode operators to D

2008-10-22 Thread Jesse Phillips
On Thu, 23 Oct 2008 09:52:34 +0900, Bill Baxter wrote: On Thu, Oct 23, 2008 at 7:27 AM, Andrei Alexandrescu [EMAIL PROTECTED] wrote: Please vote up before the haters take it down, and discuss: http://www.reddit.com/r/programming/comments/78rjk/ allowing_unicode_operators_in_d_similarly_to/