www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - English binary logic operators

reply David Qualls <davidlqualls yahoo.com> writes:
I just compiled my first D function (adapted from C), and had to
replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
from prehistoric C to get it to compile.

iso646.h has been a part of C for several years.  Perl, C++ and
possibly other languages have all adopted 'and', 'or', and 'not'
as part of their grammar.

I write software that will be maintained by non-programmers
(mathematicians, who would prefer that I use Fortran).  Lots of
funny symbols in source code (like && || !) make it difficult to
read for the non-immersed (ah, who am I kidding, I even have
trouble reading it now and then).

Is there any future to D incluing the logical operators in
English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
might also be a good (easy for non-programmers to understand)
substitute for '%'.)

David
Nov 07 2006
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.
 
 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.
 
 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).
 
 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)
 
 David
+1 After 20 years of C/C++ my use of && and || was pretty instinctual, but after just a few months of working with Python on the side I found I started typing 'and' and 'or' without thinking about it. It makes complicated expressions more readable and would fit in great with D's more "modern" look. As noted before, I'm also in favor of allowing 'in' to replace ';' in foreach statements. --bb
Nov 07 2006
next sibling parent reply Ary Manzana <ary esperanto.org.ar> writes:
Bill Baxter escribió:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).

 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
+1 After 20 years of C/C++ my use of && and || was pretty instinctual, but after just a few months of working with Python on the side I found I started typing 'and' and 'or' without thinking about it. It makes complicated expressions more readable and would fit in great with D's more "modern" look. As noted before, I'm also in favor of allowing 'in' to replace ';' in foreach statements. --bb
I guess the main reason to stick with symbols is some compatibility with C/C++ source code. Anyway, I also like the idea of words instead of symbols. You benefit from readability and it's also much more simpler to type (i.e. you don't you shift or look in a new keyboar for them).
Nov 07 2006
parent reply antonio <antonio abrevia.net> writes:
Ary Manzana wrote:
 Bill Baxter escribió:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).

 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
+1 After 20 years of C/C++ my use of && and || was pretty instinctual, but after just a few months of working with Python on the side I found I started typing 'and' and 'or' without thinking about it. It makes complicated expressions more readable and would fit in great with D's more "modern" look. As noted before, I'm also in favor of allowing 'in' to replace ';' in foreach statements. --bb
I guess the main reason to stick with symbols is some compatibility with C/C++ source code. Anyway, I also like the idea of words instead of symbols. You benefit from readability and it's also much more simpler to type (i.e. you don't you shift or look in a new keyboar for them).
Well.. I'm an spanish programmer: My code is written using Spanish terms like "valor" vs "value", "irSiguiente()" vs "goNext()"... the best of algebra symbology is the language independence: [x..y] vs "Between x and y" x < y vs "x less than y" a.b vs "the b of a" (Director Lingo used this sintax) (a)b vs "cast b to a" a = b vs "set value of a to value of b" a == b vs "a equals to b" { stamens } vs "begin stamens end" I'm forced to use the basic english programming syntax: if/else, while, for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING ENGLISH TO THE WORLD... you are not the only one programming here. thanks Antonio
Nov 23 2006
next sibling parent reply "nobody_" <spam spam.spam> writes:
 I'm forced to use the basic english programming syntax: if/else, while,
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
As for me: Please start imposing english to the world (English isn't my mother language btw.) Imposing it only as the second language of course. Diversity of thought is, most of the time, a good thing :) I kinda hate language barriers. Thus I totally agree with:
 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
Nov 23 2006
parent reply Daniel Giddings <dgiddings bigworldtech.com> writes:
nobody_ wrote:
 I'm forced to use the basic english programming syntax: if/else, while,
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 
 As for me: Please start imposing english to the world (English isn't my 
 mother language btw.)
 Imposing it only as the second language of course. Diversity of thought is, 
 most of the time, a good thing :)
 I kinda hate language barriers.
 
 Thus I totally agree with:
 
 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
Nov 23 2006
parent reply antonio <antonio abrevia.net> writes:
Daniel Giddings wrote:
 nobody_ wrote:
 I'm forced to use the basic english programming syntax: if/else, while,
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 As for me: Please start imposing english to the world (English isn't 
 my mother language btw.)
 Imposing it only as the second language of course. Diversity of 
 thought is, most of the time, a good thing :)
 I kinda hate language barriers.

 Thus I totally agree with:

 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
I'm not really interested: spanish coding using english keyword has a lot of advantadges: "value" or "class" are reserved words... "valor" and "clase" not... :-) Spanish programmer can use than english people can't (because the english version is reserved by the compiler) Mi queja se debe al hecho de que la gente piense que para que "sus matemáticos" puedan entender mejor el código, debería usarse una sintaxis "legible" en vez de una sintaxis "críptica"... presuponiendo que la sintaxis "legible" debe ser inglesa. Si el problema está en que programadores profanos deben usar un lenguaje de programación. La mejor opción es formarlos convenientemente. Si por alguna razón esto no es posible, lo mejor sería que el compilador admitiese el uso de "alias" para los símbolos y las palabras reservadas.
Nov 23 2006
next sibling parent reply Carlos Santander <csantander619 gmail.com> writes:
antonio escribió:
 Daniel Giddings wrote:
 nobody_ wrote:
 I'm forced to use the basic english programming syntax: if/else, while,
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 As for me: Please start imposing english to the world (English isn't 
 my mother language btw.)
 Imposing it only as the second language of course. Diversity of 
 thought is, most of the time, a good thing :)
 I kinda hate language barriers.

 Thus I totally agree with:

 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
I'm not really interested: spanish coding using english keyword has a lot of advantadges: "value" or "class" are reserved words... "valor" and "clase" not... :-) Spanish programmer can use than english people can't (because the english version is reserved by the compiler)
I code in Spanish when it's going to be private code (seen only by my eyes), and in English otherwise. As for the other proposal, I disagree. I made a similar proposal about 4 years ago, but now I'm not for it.
 Mi queja se debe al hecho de que la gente piense que para que "sus 
 matemáticos" puedan entender mejor el código, debería usarse una 
 sintaxis "legible" en vez de una sintaxis "críptica"... presuponiendo 
 que la sintaxis "legible" debe ser inglesa.
 
 Si el problema está en que programadores profanos deben usar un lenguaje 
 de programación.  La mejor opción es formarlos convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el compilador 
 admitiese el uso de "alias" para los símbolos y las palabras reservadas.
Hay dos razones para el uso de inglés. Primero, los primeros compiladores fueron hechos en los Estados Unidos, así que es normal que hayan usado inglés. A partir
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Carlos Santander wrote:
 antonio escribió:
 
 Daniel Giddings wrote:

 nobody_ wrote:

 I'm forced to use the basic english programming syntax: if/else, 
 while,
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 As for me: Please start imposing english to the world (English isn't 
 my mother language btw.)
 Imposing it only as the second language of course. Diversity of 
 thought is, most of the time, a good thing :)
 I kinda hate language barriers.

 Thus I totally agree with:

 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
I'm not really interested: spanish coding using english keyword has a lot of advantadges: "value" or "class" are reserved words... "valor" and "clase" not... :-) Spanish programmer can use than english people can't (because the english version is reserved by the compiler)
I code in Spanish when it's going to be private code (seen only by my eyes), and in English otherwise. As for the other proposal, I disagree. I made a similar proposal about 4 years ago, but now I'm not for it.
 Mi queja se debe al hecho de que la gente piense que para que "sus 
 matemáticos" puedan entender mejor el código, debería usarse una 
 sintaxis "legible" en vez de una sintaxis "críptica"... presuponiendo 
 que la sintaxis "legible" debe ser inglesa.

 Si el problema está en que programadores profanos deben usar un 
 lenguaje de programación.  La mejor opción es formarlos convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el 
 compilador admitiese el uso de "alias" para los símbolos y las 
 palabras reservadas.
Hay dos razones para el uso de inglés. Primero, los primeros compiladores fueron hechos en los Estados Unidos, así que es normal que
parent reply Ary Manzana <ary esperanto.org.ar> writes:
Georg Wrede escribió:
 Carlos Santander wrote:
 antonio escribió:

 Daniel Giddings wrote:

 nobody_ wrote:

 I'm forced to use the basic english programming syntax: if/else, 
 while,
 for, foreach, public, private, protected,.... PLEASE: STOP 
 IMPOSING ENGLISH TO THE WORLD... you are not the only one 
 programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 As for me: Please start imposing english to the world (English 
 isn't my mother language btw.)
 Imposing it only as the second language of course. Diversity of 
 thought is, most of the time, a good thing :)
 I kinda hate language barriers.

 Thus I totally agree with:

 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
I'm not really interested: spanish coding using english keyword has a lot of advantadges: "value" or "class" are reserved words... "valor" and "clase" not... :-) Spanish programmer can use than english people can't (because the english version is reserved by the compiler)
I code in Spanish when it's going to be private code (seen only by my eyes), and in English otherwise. As for the other proposal, I disagree. I made a similar proposal about 4 years ago, but now I'm not for it.
 Mi queja se debe al hecho de que la gente piense que para que "sus 
 matemáticos" puedan entender mejor el código, debería usarse una 
 sintaxis "legible" en vez de una sintaxis "críptica"... presuponiendo 
 que la sintaxis "legible" debe ser inglesa.

 Si el problema está en que programadores profanos deben usar un 
 lenguaje de programación.  La mejor opción es formarlos 
 convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el 
 compilador admitiese el uso de "alias" para los símbolos y las 
 palabras reservadas.
Hay dos razones para el uso de inglés. Primero, los primeros compiladores fueron hechos en los Estados Unidos, así que es normal que hayan usado inglés. A partir de ahí, los nuevos lenguajes evolucionaron a partir de los originales, y obviamente mantuvieron sus palabras reservadas. Además, se volvió natural en todo el mundo entender lo que esas palabras significaban. Pero la razón más importante es la que dijo Daniel: el inglés es en realidad el idioma universal de nuestra era, así que hay que saber aceptar eso. Un efecto de eso es que, a pesar de lo que dije en el primer punto, Ruby fue hecho por un japonés, pero a pesar de eso usa palabras inglesas. Y así muchos otros. De modo que ahora la cuestión es que no es que sea una sintaxis "legible" sino que es el mínimo común denominador, y además facilita la transición desde otros lenguajes.
Tienes razón! lukumäärä rivejä; kirjoitus jutut; jutut = lueTiedosto(käyttäjänHaluama); rivejä = säännöllinenLausekeHaku(jutut, "varakas", "i"); tulosta("Rikkaiden määrä ", rivejä); Yo no quiero programar en mi idioma (el Finlandes).
 Realmente quisiera devolver la conversación al inglés. A mí me molesta 
 cuando empiezan a escribir en alemán o algún otro idioma, así que no 
 quiero causar la misma molestia.
¿Y qué tal el Esperanto? :-P Birdo birdo = nova Birdo(); birdo.manÄi(); birdo.flugi(); Birdo birdido = birdo.seksumiKun(aliaBirdo); ktp. Al menos es más claro que el Finlandess, jejeje. Sólo quiero dar mi opinión: a mi tampoco me gusta que el inglés empiece a estar en todas partes. Lo que se debería hacer es que se pueda escribir en castellano "si" en lugar de "if" y "mientras" en lugar de "while", pero también habría que hacer que a variables, clases y métodos se les pueda dar otro nombre en otro lenguaje, con metainformación. Por ejemplo: traducción("en", "getNext") nada damePróximo() { } o algo así. Se podría ver la documentación de una librería en el idioma que quieras (como ahora, pero los nombres de las funciones también estarían traducidas). Obviamente es mucho trabajo, pero creo que valdría la pena. De todas maneras lo mejor sería que usemos un lenguaje en común que sea fácil de entender para todos, y sobre todo neutral (de ningún país)... y bueno, mi opinión es que el Esperanto sería el candidato perfecto (al igual que para hablar un idioma), pero es sólo mi opinión. Äœis, Ary
Nov 23 2006
next sibling parent Carlos Santander <csantander619 gmail.com> writes:
Ary Manzana escribió:
 
 ¿Y qué tal el Esperanto? :-P
 
 Birdo birdo = nova Birdo();
 birdo.manÄi();
 birdo.flugi();
 Birdo birdido = birdo.seksumiKun(aliaBirdo);
 ktp.
 
 Al menos es más claro que el Finlandess, jejeje. Sólo quiero dar mi 
 opinión: a mi tampoco me gusta que el inglés empiece a estar en todas 
 partes. Lo que se debería hacer es que se pueda escribir en castellano 
 "si" en lugar de "if" y "mientras" en lugar de "while", pero también 
 habría que hacer que a variables, clases y métodos se les pueda dar otro 
 nombre en otro lenguaje, con metainformación. Por ejemplo:
 
  traducción("en", "getNext")
 nada damePróximo() {
 }
 
 o algo así. Se podría ver la documentación de una librería en el idioma 
 que quieras (como ahora, pero los nombres de las funciones también 
 estarían traducidas). Obviamente es mucho trabajo, pero creo que valdría 
 la pena.
 
 De todas maneras lo mejor sería que usemos un lenguaje en común que sea 
 fácil de entender para todos, y sobre todo neutral (de ningún país)... y 
 bueno, mi opinión es que el Esperanto sería el candidato perfecto (al 
 igual que para hablar un idioma), pero es sólo mi opinión.
 
 Äœis,
 Ary
Eso es peor. Es como decir, un francés y un inglés quieren hacer negocio, así que deciden negociar en árabe, que ninguno de los dos sabe, porque es neutral. Es un placer leer y escribir en español, ¿pero podemos volver al inglés o llevar esto a otro lado? -- Carlos Santander Bernal
Nov 23 2006
prev sibling parent Don Clugston <dac nospam.com.au> writes:
Ary Manzana wrote:
 Georg Wrede escribió:
 Carlos Santander wrote:
 antonio escribió:

 Daniel Giddings wrote:

 nobody_ wrote:

 I'm forced to use the basic english programming syntax: if/else, 
 while,
 for, foreach, public, private, protected,.... PLEASE: STOP 
 IMPOSING ENGLISH TO THE WORLD... you are not the only one 
 programming here.

 thanks
 Antonio
"English is the most widely taught and understood language in the world, and sometimes is described as a lingua franca." - Wikipedia, http://en.wikipedia.org/wiki/English_language Thus for me (aside from being Aussie), English is the best choice, as having other people able to understand your code is the most important consideration when writing code... after all if you code isn't correct, someone else can fix it if they can understand it ;-)
 As for me: Please start imposing english to the world (English 
 isn't my mother language btw.)
 Imposing it only as the second language of course. Diversity of 
 thought is, most of the time, a good thing :)
 I kinda hate language barriers.

 Thus I totally agree with:

 the best of algebra symbology is the language independence:
But it shouldn't be that difficult to startof a project on dsource which would enable the selection of different languages for these and alike:
 "valor" vs "value", "irSiguiente()" vs "goNext()"...
It could even have a function to translate some of the algebra symbology.
It would be interesting to see how popular such a project is - I really have no idea how much non-native English programmers would prefer writing code in their own language if automatic conversion was possible. :-) Dan
I'm not really interested: spanish coding using english keyword has a lot of advantadges: "value" or "class" are reserved words... "valor" and "clase" not... :-) Spanish programmer can use than english people can't (because the english version is reserved by the compiler)
I code in Spanish when it's going to be private code (seen only by my eyes), and in English otherwise. As for the other proposal, I disagree. I made a similar proposal about 4 years ago, but now I'm not for it.
 Mi queja se debe al hecho de que la gente piense que para que "sus 
 matemáticos" puedan entender mejor el código, debería usarse una 
 sintaxis "legible" en vez de una sintaxis "críptica"... 
 presuponiendo que la sintaxis "legible" debe ser inglesa.

 Si el problema está en que programadores profanos deben usar un 
 lenguaje de programación.  La mejor opción es formarlos 
 convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el 
 compilador admitiese el uso de "alias" para los símbolos y las 
 palabras reservadas.
Hay dos razones para el uso de inglés. Primero, los primeros compiladores fueron hechos en los Estados Unidos, así que es normal que hayan usado inglés. A partir de ahí, los nuevos lenguajes evolucionaron a partir de los originales, y obviamente mantuvieron sus palabras reservadas. Además, se volvió natural en todo el mundo entender lo que esas palabras significaban. Pero la razón más importante es la que dijo Daniel: el inglés es en realidad el idioma universal de nuestra era, así que hay que saber aceptar eso. Un efecto de eso es que, a pesar de lo que dije en el primer punto, Ruby fue hecho por un japonés, pero a pesar de eso usa palabras inglesas. Y así muchos otros. De modo que ahora la cuestión es que no es que sea una sintaxis "legible" sino que es el mínimo común denominador, y además facilita la transición desde otros lenguajes.
Tienes razón! lukumäärä rivejä; kirjoitus jutut; jutut = lueTiedosto(käyttäjänHaluama); rivejä = säännöllinenLausekeHaku(jutut, "varakas", "i"); tulosta("Rikkaiden määrä ", rivejä); Yo no quiero programar en mi idioma (el Finlandes).
 Realmente quisiera devolver la conversación al inglés. A mí me 
 molesta cuando empiezan a escribir en alemán o algún otro idioma, así 
 que no quiero causar la misma molestia.
¿Y qué tal el Esperanto? :-P Birdo birdo = nova Birdo(); birdo.manÄi(); birdo.flugi(); Birdo birdido = birdo.seksumiKun(aliaBirdo); ktp.
Jes! Bonvolu!
Nov 24 2006
prev sibling parent reply "nobody_" <spam spam.spam> writes:
 Mi queja se debe al hecho de que la gente piense que para que "sus
 matemáticos" puedan entender mejor el código, debería usarse una sintaxis 
 "legible" en vez de una sintaxis "críptica"... presuponiendo que la 
 sintaxis "legible" debe ser inglesa.

 Si el problema está en que programadores profanos deben usar un lenguaje 
 de programación.  La mejor opción es formarlos convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el compilador 
 admitiese el uso de "alias" para los símbolos y las palabras reservadas.
Why do you reply in spanish?
Nov 25 2006
next sibling parent "nobody_" <spam spam.spam> writes:
 Why do you reply in spanish?
If anybody replied in my mother language, and I would like to reply, I would reply in english and translate the the relevant parts off the original post. Because I think most people here at least understand english.
Nov 25 2006
prev sibling parent antonio <antonio abrevia.net> writes:
nobody_ wrote:
 Mi queja se debe al hecho de que la gente piense que para que "sus
 matemáticos" puedan entender mejor el código, debería usarse una sintaxis 
 "legible" en vez de una sintaxis "críptica"... presuponiendo que la 
 sintaxis "legible" debe ser inglesa.

 Si el problema está en que programadores profanos deben usar un lenguaje 
 de programación.  La mejor opción es formarlos convenientemente.
 Si por alguna razón esto no es posible, lo mejor sería que el compilador 
 admitiese el uso de "alias" para los símbolos y las palabras reservadas.
Why do you reply in spanish?
Because I have something to say... but not enough english level to express it... Sorry :-( Just my fault
Nov 26 2006
prev sibling next sibling parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
antonio wrote:
 
 I'm forced to use the basic english programming syntax: if/else, while, 
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.
 
 thanks
 Antonio
Well I say *don't* stop imposing english to the world. Hum, "imposing" is a strong word here, I wouldn't go out of my way to force another to use english, but I would like them to, and I wouldn't help in efforts to the contrary. Why? The value of the network is the square of the of numbers of users. The less language barriers and segregation the better, the more people that know and use a common language the better. This is a subjective opinion that I know not all share as much as I. I have been said to have more of the "citizen of the world" mentality than most people. (I'm portuguese btw, my natural language being Portuguese) Second, English is the prime candidate for that common language, because it is one of the most widely spoken, *in* the more important contexts (books, movies, information, nations). And also (in the context of programming) *especially* because it is more succinct and expressive that most other languages. -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Nov 24 2006
parent reply antonio <antonio abrevia.net> writes:
Bruno Medeiros wrote:
 antonio wrote:
 I'm forced to use the basic english programming syntax: if/else, 
 while, for, foreach, public, private, protected,.... PLEASE: STOP 
 IMPOSING ENGLISH TO THE WORLD... you are not the only one programming 
 here.

 thanks
 Antonio
Well I say *don't* stop imposing english to the world. Hum, "imposing" is a strong word here, I wouldn't go out of my way to force another to use english, but I would like them to, and I wouldn't help in efforts to the contrary. Why? The value of the network is the square of the of numbers of users. The less language barriers and segregation the better, the more people that know and use a common language the better. This is a subjective opinion that I know not all share as much as I. I have been said to have more of the "citizen of the world" mentality than most people. (I'm portuguese btw, my natural language being Portuguese) Second, English is the prime candidate for that common language, because it is one of the most widely spoken, *in* the more important contexts (books, movies, information, nations). And also (in the context of programming) *especially* because it is more succinct and expressive that most other languages.
Simplicity in arguments forced million people die in Holocaust :-/. Let time and people defend and propose their solutions... natural evolution is better than forced imposition. I defend, now, && because is not "and" or "y"... :-)
Nov 25 2006
next sibling parent reply Bill Baxter <wbaxter gmail.com> writes:
antonio wrote:
 Bruno Medeiros wrote:
 
 antonio wrote:

 Simplicity in arguments forced million people die in Holocaust :-/.
 
 Let time and people defend and propose their solutions... natural 
 evolution is better than forced imposition.
 
 I defend, now, && because is not "and" or "y"... :-)
Cool! Thread's officially over now! http://en.wikipedia.org/wiki/Godwin's_law --bb
Nov 25 2006
parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Bill Baxter wrote:
 antonio wrote:
 Bruno Medeiros wrote:

 antonio wrote:

 Simplicity in arguments forced million people die in Holocaust :-/.

 Let time and people defend and propose their solutions... natural 
 evolution is better than forced imposition.

 I defend, now, && because is not "and" or "y"... :-)
O_o
 
 Cool! Thread's officially over now!
 http://en.wikipedia.org/wiki/Godwin's_law
 
 --bb
Hell yeah... and it came surprisingly fast, Blitzkrieg style :P -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Nov 28 2006
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Bruno Medeiros wrote:
 Bill Baxter wrote:
 antonio wrote:
 Bruno Medeiros wrote:

 antonio wrote:

 Simplicity in arguments forced million people die in Holocaust :-/.

 Let time and people defend and propose their solutions... natural 
 evolution is better than forced imposition.

 I defend, now, && because is not "and" or "y"... :-)
O_o
 Cool! Thread's officially over now!
 http://en.wikipedia.org/wiki/Godwin's_law

 --bb
Hell yeah... and it came surprisingly fast, Blitzkrieg style :P
:-) Now we just need someone to post a Nazi comparison to the global warming thread. ;-) I'd do it but I just can't think of a good angle... --bb
Nov 28 2006
parent "John Reimer" <terminal.node gmail.com> writes:
On Tue, 28 Nov 2006 18:04:03 -0800, Bill Baxter  
<dnewsgroup billbaxter.com> wrote:

 Bruno Medeiros wrote:
 Bill Baxter wrote:
 antonio wrote:
 Bruno Medeiros wrote:

 antonio wrote:

 Simplicity in arguments forced million people die in Holocaust :-/.

 Let time and people defend and propose their solutions... natural  
 evolution is better than forced imposition.

 I defend, now, && because is not "and" or "y"... :-)
O_o
 Cool! Thread's officially over now!
 http://en.wikipedia.org/wiki/Godwin's_law

 --bb
Hell yeah... and it came surprisingly fast, Blitzkrieg style :P
:-) Now we just need someone to post a Nazi comparison to the global warming thread. ;-) I'd do it but I just can't think of a good angle... --bb
I thought it was over... until you brought it up here. :D -JJR
Nov 28 2006
prev sibling parent "nobody_" <spam spam.spam> writes:
"antonio" <antonio abrevia.net> wrote in message 
news:ekajgv$1ogg$1 digitaldaemon.com...
 Bruno Medeiros wrote:
 antonio wrote:
 I'm forced to use the basic english programming syntax: if/else, while, 
 for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING 
 ENGLISH TO THE WORLD... you are not the only one programming here.

 thanks
 Antonio
Well I say *don't* stop imposing english to the world. Hum, "imposing" is a strong word here, I wouldn't go out of my way to force another to use english, but I would like them to, and I wouldn't help in efforts to the contrary. Why? The value of the network is the square of the of numbers of users. The less language barriers and segregation the better, the more people that know and use a common language the better. This is a subjective opinion that I know not all share as much as I. I have been said to have more of the "citizen of the world" mentality than most people. (I'm portuguese btw, my natural language being Portuguese) Second, English is the prime candidate for that common language, because it is one of the most widely spoken, *in* the more important contexts (books, movies, information, nations). And also (in the context of programming) *especially* because it is more succinct and expressive that most other languages.
Simplicity in arguments forced million people die in Holocaust :-/.
Lol, talk about simple arguments :D He explained his stance quite well, in contrary to your 'argument'? I too really don't care about nationality when it comes to programming languages :D That said, I too want keep using && because it has an even more broader audience.
Nov 25 2006
prev sibling parent reply Don Clugston <dac nospam.com.au> writes:
antonio wrote:
 Ary Manzana wrote:
 Bill Baxter escribió:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).

 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
+1 After 20 years of C/C++ my use of && and || was pretty instinctual, but after just a few months of working with Python on the side I found I started typing 'and' and 'or' without thinking about it. It makes complicated expressions more readable and would fit in great with D's more "modern" look. As noted before, I'm also in favor of allowing 'in' to replace ';' in foreach statements. --bb
I guess the main reason to stick with symbols is some compatibility with C/C++ source code. Anyway, I also like the idea of words instead of symbols. You benefit from readability and it's also much more simpler to type (i.e. you don't you shift or look in a new keyboar for them).
Well.. I'm an spanish programmer: My code is written using Spanish terms like "valor" vs "value", "irSiguiente()" vs "goNext()"... the best of algebra symbology is the language independence: [x..y] vs "Between x and y" x < y vs "x less than y" a.b vs "the b of a" (Director Lingo used this sintax) (a)b vs "cast b to a" a = b vs "set value of a to value of b" a == b vs "a equals to b" { stamens } vs "begin stamens end" I'm forced to use the basic english programming syntax: if/else, while, for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING ENGLISH TO THE WORLD... you are not the only one programming here.
I've got a lot of sympathy to this. I'm really surprised that I don't hear this view more often. I'm currently maintaining some code that was written in Italian, modified in German, and now there's some English. It's a pig's breakfast. But still... My feeling is... do not program in a language which you are not fluent in. I prefer to try to read Italian written by a native speaker, than a garbled attempt at English -- it's horrible to read code that was written by someone who was putting more energy into translation, than into thinking about their programming problem. In the open-source Fast Fourier Transform project (www.fftw.org), there's a file with code written in Latin. :->
Nov 24 2006
parent reply "Craig Black" <cblack ara.com> writes:
"Don Clugston" <dac nospam.com.au> wrote in message 
news:ek71e0$1ako$1 digitaldaemon.com...
 antonio wrote:
 Ary Manzana wrote:
 Bill Baxter escribió:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).

 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
+1 After 20 years of C/C++ my use of && and || was pretty instinctual, but after just a few months of working with Python on the side I found I started typing 'and' and 'or' without thinking about it. It makes complicated expressions more readable and would fit in great with D's more "modern" look. As noted before, I'm also in favor of allowing 'in' to replace ';' in foreach statements. --bb
I guess the main reason to stick with symbols is some compatibility with C/C++ source code. Anyway, I also like the idea of words instead of symbols. You benefit from readability and it's also much more simpler to type (i.e. you don't you shift or look in a new keyboar for them).
Well.. I'm an spanish programmer: My code is written using Spanish terms like "valor" vs "value", "irSiguiente()" vs "goNext()"... the best of algebra symbology is the language independence: [x..y] vs "Between x and y" x < y vs "x less than y" a.b vs "the b of a" (Director Lingo used this sintax) (a)b vs "cast b to a" a = b vs "set value of a to value of b" a == b vs "a equals to b" { stamens } vs "begin stamens end" I'm forced to use the basic english programming syntax: if/else, while, for, foreach, public, private, protected,.... PLEASE: STOP IMPOSING ENGLISH TO THE WORLD... you are not the only one programming here.
I've got a lot of sympathy to this. I'm really surprised that I don't hear this view more often. I'm currently maintaining some code that was written in Italian, modified in German, and now there's some English. It's a pig's breakfast. But still... My feeling is... do not program in a language which you are not fluent in. I prefer to try to read Italian written by a native speaker, than a garbled attempt at English -- it's horrible to read code that was written by someone who was putting more energy into translation, than into thinking about their programming problem. In the open-source Fast Fourier Transform project (www.fftw.org), there's a file with code written in Latin. :->
I suppose Latin would be great if you want language neutrality. Might be politically correct, but not very practical. I hate to be the bigot here, but let's face it. As far as international languages go, English is a standard. Sorry, but it's not my fault. It's just the way it is. However, if I had it my way we would all be speaking a simpler language. I hate English. A written language should be completely phonetic and orthogonal. There shouldn't be silent letters, myriads of exceptions to rules of thumb, and ridiculous non-phonetic pronunciations. Back to the topic, adding "and" and "or" wouldn't replace the symbolic representation. The symbolic representation would still be valid, so I see this as a benign addition to D. It seems it would make a lot of people happy, and would be easy to do, so I am not opposed to it. -Craig
Nov 27 2006
next sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
Craig Black wrote:
ard.  Sorry, but it's not my fault.  It's just the way it is.
 
 However, if I had it my way we would all be speaking a simpler language. 
 I
 hate English.  A written language should be completely phonetic and
 orthogonal.  There shouldn't be silent letters, myriads of exceptions to
 rules of thumb, and ridiculous non-phonetic pronunciations.
Esperanto? -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Nov 27 2006
prev sibling parent reply David Qualls <davidlqualls yahoo.com> writes:
== Quote from Craig Black (cblack ara.com)'s article
 I suppose Latin would be great if you want language neutrality.
Might be
 politically correct, but not very practical.  I hate to be the
bigot here,
 but let's face it.  As far as international languages go,
English is a
 standard.  Sorry, but it's not my fault.  It's just the way it
is.
 However, if I had it my way we would all be speaking a simpler
language. I
 hate English.  A written language should be completely phonetic
and
 orthogonal.  There shouldn't be silent letters, myriads of
exceptions to
 rules of thumb, and ridiculous non-phonetic pronunciations.
 Back to the topic, adding "and" and "or" wouldn't replace the
symbolic
 representation.  The symbolic representation would still be
valid, so I see
 this as a benign addition to D.   It seems it would make a lot
of people
 happy, and would be easy to do, so I am not opposed to it.
 -Craig
Thanks, Craig. This subject seems to have taken on a life of it's own. The simple summary is as you put it, 'and', 'or', etc would not *REPLACE* &&, ||, etc., just be available to those who found them easier to use. Just as in C and C++. I don't find the many proposals to "internationalize" the D language very compelling. Face it, D is not trying to become the new rubbery language. It's basically an enhanced and improved C++. If niche groups did successfully translate the C++ language into other nationalities, perhaps those same niche groups could do the same with D. Of course, it wouldn't be D then; just like C in Latin is not *really* C (at least I don't see anything in the standard that allows the keywords to be replaced by their Latin equivalents). There was a reason C and C++ caved, and adopted English operators. I reckon that for the very same reason, D will be hindered from a place of prominence if it does not adopt English operators. Those who want them won't find them in D, and will move on. Perhaps a few more BRIEF opinions regarding whether the standard English operators should be adopted within the D language would be enough to send the think-tank to their Cave Of Contemplation to debate it amongst themselves. I, for one, am eager to hear what they have to say. I don't recall seeing Walter weigh-in on this discussion. David
Nov 27 2006
parent reply Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Qualls schrieb am 2006-11-28:

 Perhaps a few more BRIEF opinions regarding whether the standard
 English operators should be adopted within the D language would be
 enough to send the think-tank to their Cave Of Contemplation to
 debate it amongst themselves. 
Adding addtional keywords that have exactly the same functions like already present keywords (actually keytokens) seems to be against D's spirit. The more general issue: Iv'e checked 10 random C/C++ projects (taken from Gentoo's portage) and none of them used iso646.h's alternative spellings. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf fpEBz2SVezekjI+rWqpibfE= =nQ5N -----END PGP SIGNATURE-----
Nov 27 2006
parent reply Daniel Keep <daniel.keep+lists gmail.com> writes:
Thomas Kuehne wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 David Qualls schrieb am 2006-11-28:
 
 
Perhaps a few more BRIEF opinions regarding whether the standard
English operators should be adopted within the D language would be
enough to send the think-tank to their Cave Of Contemplation to
debate it amongst themselves. 
Adding addtional keywords that have exactly the same functions like already present keywords (actually keytokens) seems to be against D's spirit. The more general issue: Iv'e checked 10 random C/C++ projects (taken from Gentoo's portage) and none of them used iso646.h's alternative spellings. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf fpEBz2SVezekjI+rWqpibfE= =nQ5N -----END PGP SIGNATURE-----
Hang on... doesn't that header define macros that look like normal prefix functions? You're comparing this:
 (expr1 and expr2) or (expr2 and expr3)
with this:
 or(and(expr1, expr2), and(expr2, expr3))
Given the choice between the existing boolean operators and the second lot, I'd choose the existing ones any day. Given the choice between the existing operators and the first lot, I'd chose the first lot. It's like the referendum regarding Australia becoming a republic: people voted against it, and the government toted that out saying "see, the public don't WANT to separate from England!" Fact was, most polls showed that people DID want to become a republic. What they had a problem with was the nasty little condition the government added: the PM would chose the president, NOT the people. What would be the point of even *having* a president if we can't choose who it is? Hence, given the choice between the way things are now, and a half-arsed token offering that leaves a bad taste in your mouth, we chose the lesser of two evils. Blech; I'm rambling. Sorry about that :) -- Daniel
Nov 28 2006
next sibling parent Sean Kelly <sean f4.ca> writes:
Daniel Keep wrote:
 Thomas Kuehne wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1

 David Qualls schrieb am 2006-11-28:


 Perhaps a few more BRIEF opinions regarding whether the standard
 English operators should be adopted within the D language would be
 enough to send the think-tank to their Cave Of Contemplation to
 debate it amongst themselves. 
Adding addtional keywords that have exactly the same functions like already present keywords (actually keytokens) seems to be against D's spirit. The more general issue: Iv'e checked 10 random C/C++ projects (taken from Gentoo's portage) and none of them used iso646.h's alternative spellings. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf fpEBz2SVezekjI+rWqpibfE= =nQ5N -----END PGP SIGNATURE-----
Hang on... doesn't that header define macros that look like normal prefix functions?
No. They actually alias '&&' with 'and'. Macros are a wonderful (read: terrifying) thing.
 You're comparing this:
 
  > (expr1 and expr2) or (expr2 and expr3)
 
 with this:
 
  > or(and(expr1, expr2), and(expr2, expr3))
 
 Given the choice between the existing boolean operators and the second 
 lot, I'd choose the existing ones any day.  Given the choice between the 
 existing operators and the first lot, I'd chose the first lot.
Then you're in luck, so long as you're using C/C++ :-) Sean
Nov 28 2006
prev sibling parent reply Bill Baxter <wbaxter gmail.com> writes:
Daniel Keep wrote:
 Thomas Kuehne wrote:
 
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1

 David Qualls schrieb am 2006-11-28:


 Perhaps a few more BRIEF opinions regarding whether the standard
 English operators should be adopted within the D language would be
 enough to send the think-tank to their Cave Of Contemplation to
 debate it amongst themselves. 
Adding addtional keywords that have exactly the same functions like already present keywords (actually keytokens) seems to be against D's spirit. The more general issue: Iv'e checked 10 random C/C++ projects (taken from Gentoo's portage) and none of them used iso646.h's alternative spellings. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf fpEBz2SVezekjI+rWqpibfE= =nQ5N -----END PGP SIGNATURE-----
Hang on... doesn't that header define macros that look like normal prefix functions? You're comparing this: > (expr1 and expr2) or (expr2 and expr3) with this: > or(and(expr1, expr2), and(expr2, expr3))
[snip]
 
 Blech; I'm rambling.  Sorry about that :)
And not doing your homework either. :-) A rudimentary google search turns up: #define and && [keyword in C++] #define and_eq &= [keyword in C++] #define bitand & [keyword in C++] #define bitor | [keyword in C++] #define compl ~ [keyword in C++] #define not ! [keyword in C++] #define not_eq != [keyword in C++] #define or || [keyword in C++] #define or_eq |= [keyword in C++] #define xor ^ [keyword in C++] #define xor_eq ^= [keyword in C++] So, no, iso464.h is not about prefix operators. Just some simple #defines. Interesting story about Australia not becoming a republic though. :-) --bb
Nov 28 2006
parent reply Daniel Keep <daniel.keep+lists gmail.com> writes:
Bill Baxter wrote:
 Daniel Keep wrote:
 
 Thomas Kuehne wrote:

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1

 David Qualls schrieb am 2006-11-28:


 Perhaps a few more BRIEF opinions regarding whether the standard
 English operators should be adopted within the D language would be
 enough to send the think-tank to their Cave Of Contemplation to
 debate it amongst themselves. 
Adding addtional keywords that have exactly the same functions like already present keywords (actually keytokens) seems to be against D's spirit. The more general issue: Iv'e checked 10 random C/C++ projects (taken from Gentoo's portage) and none of them used iso646.h's alternative spellings. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf fpEBz2SVezekjI+rWqpibfE= =nQ5N -----END PGP SIGNATURE-----
Hang on... doesn't that header define macros that look like normal prefix functions? You're comparing this: > (expr1 and expr2) or (expr2 and expr3) with this: > or(and(expr1, expr2), and(expr2, expr3))
[snip]
 Blech; I'm rambling.  Sorry about that :)
And not doing your homework either. :-) A rudimentary google search turns up: #define and && [keyword in C++] #define and_eq &= [keyword in C++] #define bitand & [keyword in C++] #define bitor | [keyword in C++] #define compl ~ [keyword in C++] #define not ! [keyword in C++] #define not_eq != [keyword in C++] #define or || [keyword in C++] #define or_eq |= [keyword in C++] #define xor ^ [keyword in C++] #define xor_eq ^= [keyword in C++] So, no, iso464.h is not about prefix operators. Just some simple #defines.
Blech. Don't mind me, then. In my defense, I didn't even know that header existed until I read this thread :P
 Interesting story about Australia not becoming a republic though.  :-)
 
 --bb
Bloody John Howard. I'd vote against him if the alternative wasn't worse :( -- Daniel
Nov 28 2006
parent Don Clugston <dac nospam.com.au> writes:
Daniel Keep wrote:
 Bill Baxter wrote:
 Daniel Keep wrote:
 Interesting story about Australia not becoming a republic though.  :-)

 --bb
Bloody John Howard. I'd vote against him if the alternative wasn't worse :(
Most dishonest politician I know of. I'm not going back to Oz until he's gone.
Nov 30 2006
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Bill Baxter wrote:
 David Qualls wrote:
 After 20 years of C/C++ my use of && and || was pretty instinctual, but 
 after just a few months of working with Python on the side I found I 
 started typing 'and' and 'or' without thinking about it.  
I think my meaning wasn't so clear so let me rephrase. It took no time to get used to 'and/or' when learning python. I don't recall ever mistakenly using '&&' in my first few python attempts. But what happened after a few months (and continues to today) is that I sometimes type 'and/or' in *C++* code (and now *D* too) when I mean &&/||. I think it's just because in my head I'm *thinking* 'if this and that' as I type. My brain recognizes 'and' as a legal keyword from somewhere and so my fingers type it. Unfortunately, if && and || are to be eliminated wholesale, the benefit will be seen as too small to be worth the pain of fixing all old code. Furthermore Walter believes that C/C++ syntax must be good enough or it wouldn't have survived so long (or something like that). And he believes that D should look and behave like C/C++ as much as possible to ease the transition for C/C++ refugees (hence the decision to not fix used wherever possible instead of new keywords (hence we have ':' showing up everywhere for all kinds of different purposes, and "static" with even more meanings than in C++). It could be possible to add 'and' and 'or' as _synonyms_, but that smacks as too many ways to do the same thing, and adds two keywords for something for which there is already another way to do it. It doesn't let you do or express anything you couldn't before. So in short, it's pretty hopeless. But I agree it would make the code more readable and make overall for a more aesthetically pleasing language. Maybe it could be considered for a backwards-incompatible D 2.0. Maybe D 2.0 will have a way to redefine or alias keywords so you could just "import std.english_keywords" to get that functionality. The problem with that will be that Walter really likes for D to be easy to parse, and part of that is being able to recognize tokens as keywords immediately without any special complicated logic. But I'm with you. It would be nice to see in D 2.0. One thing the NumPy folks did as they made lots of changes prior to 1.0 was to keep a 'convertCode' script up to date with each change. For most cases just running 'convertCode' on your source files is enough to get you pretty close to compatible with the latest code. --bb
Nov 07 2006
next sibling parent reply Sean Kelly <sean f4.ca> writes:
Bill Baxter wrote:
 Bill Baxter wrote:
 David Qualls wrote:
 After 20 years of C/C++ my use of && and || was pretty instinctual, 
 but after just a few months of working with Python on the side I found 
 I started typing 'and' and 'or' without thinking about it.  
I think my meaning wasn't so clear so let me rephrase. It took no time to get used to 'and/or' when learning python. I don't recall ever mistakenly using '&&' in my first few python attempts. But what happened after a few months (and continues to today) is that I sometimes type 'and/or' in *C++* code (and now *D* too) when I mean &&/||. I think it's just because in my head I'm *thinking* 'if this and that' as I type. My brain recognizes 'and' as a legal keyword from somewhere and so my fingers type it. Unfortunately, if && and || are to be eliminated wholesale, the benefit will be seen as too small to be worth the pain of fixing all old code. Furthermore Walter believes that C/C++ syntax must be good enough or it wouldn't have survived so long (or something like that). And he believes that D should look and behave like C/C++ as much as possible to ease the transition for C/C++ refugees (hence the decision to not fix used wherever possible instead of new keywords (hence we have ':' showing up everywhere for all kinds of different purposes, and "static" with even more meanings than in C++). It could be possible to add 'and' and 'or' as _synonyms_, but that smacks as too many ways to do the same thing, and adds two keywords for something for which there is already another way to do it. It doesn't let you do or express anything you couldn't before.
For what it's worth, 'and' and 'or' as synonyms for '&&' and '||' already exists in C/C++. Trigraphs are a largely unknown feature that many appear to dislike, but I have read a reasonable argument that they are useful for teaching new programmers. Personally, I think that learning the meaning of new symbols is part of learning any language, so what's important is really that these symbols be easily recognizable and clearly meaningful. Once you've learned that '&&' represents a logical 'and' operation, are you liable to forget that or mistake it for something else? Also, binary 'and' (ie. '&') may want a descriptive term as well, if we're adding support for the logical operators. And I think that's when things begin to get confusing with the English terms. Sean
Nov 08 2006
parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Sean Kelly wrote:
 Bill Baxter wrote:
 Bill Baxter wrote:
 David Qualls wrote:
 After 20 years of C/C++ my use of && and || was pretty instinctual, 
 but after just a few months of working with Python on the side I 
 found I started typing 'and' and 'or' without thinking about it.  
I think my meaning wasn't so clear so let me rephrase. It took no time to get used to 'and/or' when learning python. I don't recall ever mistakenly using '&&' in my first few python attempts. But what happened after a few months (and continues to today) is that I sometimes type 'and/or' in *C++* code (and now *D* too) when I mean &&/||. I think it's just because in my head I'm *thinking* 'if this and that' as I type. My brain recognizes 'and' as a legal keyword from somewhere and so my fingers type it. Unfortunately, if && and || are to be eliminated wholesale, the benefit will be seen as too small to be worth the pain of fixing all old code. Furthermore Walter believes that C/C++ syntax must be good enough or it wouldn't have survived so long (or something like that). And he believes that D should look and behave like C/C++ as much as possible to ease the transition for C/C++ refugees (hence the decision to not fix how switch works). He also believes that symbols (hence we have ':' showing up everywhere for all kinds of different purposes, and "static" with even more meanings than in C++). It could be possible to add 'and' and 'or' as _synonyms_, but that smacks as too many ways to do the same thing, and adds two keywords for something for which there is already another way to do it. It doesn't let you do or express anything you couldn't before.
For what it's worth, 'and' and 'or' as synonyms for '&&' and '||' already exists in C/C++. Trigraphs are a largely unknown feature that many appear to dislike, but I have read a reasonable argument that they are useful for teaching new programmers.
What do C trigraphs have to do with 'and' and 'or' as synonyms for '&&' and '||'? -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Nov 14 2006
parent Sean Kelly <sean f4.ca> writes:
Bruno Medeiros wrote:
 Sean Kelly wrote:
 Bill Baxter wrote:
 Bill Baxter wrote:
 David Qualls wrote:
 After 20 years of C/C++ my use of && and || was pretty instinctual, 
 but after just a few months of working with Python on the side I 
 found I started typing 'and' and 'or' without thinking about it.  
I think my meaning wasn't so clear so let me rephrase. It took no time to get used to 'and/or' when learning python. I don't recall ever mistakenly using '&&' in my first few python attempts. But what happened after a few months (and continues to today) is that I sometimes type 'and/or' in *C++* code (and now *D* too) when I mean &&/||. I think it's just because in my head I'm *thinking* 'if this and that' as I type. My brain recognizes 'and' as a legal keyword from somewhere and so my fingers type it. Unfortunately, if && and || are to be eliminated wholesale, the benefit will be seen as too small to be worth the pain of fixing all old code. Furthermore Walter believes that C/C++ syntax must be good enough or it wouldn't have survived so long (or something like that). And he believes that D should look and behave like C/C++ as much as possible to ease the transition for C/C++ refugees (hence the decision to not fix how switch works). He also believes that symbols (hence we have ':' showing up everywhere for all kinds of different purposes, and "static" with even more meanings than in C++). It could be possible to add 'and' and 'or' as _synonyms_, but that smacks as too many ways to do the same thing, and adds two keywords for something for which there is already another way to do it. It doesn't let you do or express anything you couldn't before.
For what it's worth, 'and' and 'or' as synonyms for '&&' and '||' already exists in C/C++. Trigraphs are a largely unknown feature that many appear to dislike, but I have read a reasonable argument that they are useful for teaching new programmers.
What do C trigraphs have to do with 'and' and 'or' as synonyms for '&&' and '||'?
Nothing :-p I was confusing two similar but unrelated language features. Sean
Nov 14 2006
prev sibling parent =?UTF-8?B?QW5kZXJzIEYgQmrDtnJrbHVuZA==?= <afb algonet.se> writes:
Bill Baxter wrote:

 Unfortunately, if && and || are to be eliminated wholesale, the benefit 
 will be seen as too small to be worth the pain of fixing all old code. 
 Furthermore Walter believes that C/C++ syntax must be good enough or it 
 wouldn't have survived so long (or something like that).  And he 
 believes that D should look and behave like C/C++ as much as possible to 
 ease the transition for C/C++ refugees (hence the decision to not fix 

 used wherever possible instead of new keywords (hence we have ':' 
 showing up everywhere for all kinds of different purposes, and "static" 
 with even more meanings than in C++).
 
 It could be possible to add 'and' and 'or' as _synonyms_, but that 
 smacks as too many ways to do the same thing, and adds two keywords for 
 something for which there is already another way to do it.  It doesn't 
 let you do or express anything you couldn't before.
I think it's a sign of weakness that there can be only one way to do it: If "and" is added, then && must go. If "is" is added, then === must go. --anders
Nov 24 2006
prev sibling parent reply BCS <BCS pathilink.com> writes:
David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.
 
 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.
 
 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).
 
 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)
 
 David
Interesting, I have never heard about iso646.h before. I have never seen any code that used it either. I only speak for my self, but I wouldn't use it and would find it harder to use. I like the &!|% version because it doesn't look like an identifier.
Nov 07 2006
next sibling parent Ary Manzana <ary esperanto.org.ar> writes:
 I only speak for my self, but I wouldn't use it and would find it harder 
 to use. I like the &!|% version because it doesn't look like an identifier.
"and" dosen't look like an identifier in my editor: it's blue instead of black :-P
Nov 07 2006
prev sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
BCS wrote:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).

 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
Interesting, I have never heard about iso646.h before. I have never seen any code that used it either.
I'd never heard of it either. But I love the description on this page: http://www.frech.ch/man/man0p/iso646.h.0p.html APPLICATION USAGE none. RATIONALE none. So it's of no use and there's no reason for it. Great!
 I only speak for my self, but I wouldn't use it and would find it harder 
 to use. I like the &!|% version because it doesn't look like an identifier.
In &&'s favor it also lets you really cram things together :-) if(a&&b&&c) has to become if(a and b and c) with words. But that's not necessarily a good thing. Which of the above would you rather be staring at at 3am at the end of a long night coding? --bb
Nov 07 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
Bill Baxter wrote:
 BCS wrote:
 David Qualls wrote:
 I just compiled my first D function (adapted from C), and had to
 replace all my 'and' 'or' and 'not's with the arcane &&, ||, and !
 from prehistoric C to get it to compile.

 iso646.h has been a part of C for several years.  Perl, C++ and
 possibly other languages have all adopted 'and', 'or', and 'not'
 as part of their grammar.

 I write software that will be maintained by non-programmers
 (mathematicians, who would prefer that I use Fortran).  Lots of
 funny symbols in source code (like && || !) make it difficult to
 read for the non-immersed (ah, who am I kidding, I even have
 trouble reading it now and then).
ummmm .. mathematicians use more complicated symbols and notations than programmers.
 Is there any future to D incluing the logical operators in
 English, as opposed to &!|%'ish?  (I didn't mention it, but 'mod'
 might also be a good (easy for non-programmers to understand)
 substitute for '%'.)

 David
Interesting, I have never heard about iso646.h before. I have never seen any code that used it either.
I'd never heard of it either. But I love the description on this page: http://www.frech.ch/man/man0p/iso646.h.0p.html APPLICATION USAGE none. RATIONALE none. So it's of no use and there's no reason for it. Great!
 I only speak for my self, but I wouldn't use it and would find it 
 harder to use. I like the &!|% version because it doesn't look like an 
 identifier.
In &&'s favor it also lets you really cram things together :-) if(a&&b&&c) has to become if(a and b and c) with words. But that's not necessarily a good thing. Which of the above would you rather be staring at at 3am at the end of a long night coding? --bb
I actually like symbols in code because they stand out right away. I always prefer {braces} to begin/end. At the same time, I hate too many symbols too close to each other.
Nov 08 2006
parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Hasan Aljudy wrote:
 ...
 ummmm .. mathematicians use more complicated symbols and notations than
 programmers.
It's funny; but the early programming languages were designed by mathematicians. Trust me, if they'd been able to use ∧ for and, and ∨ for or, they would have :) On a few systems, they actually *did*. I think programmers use "simpler" notation simply because we're limited to what we can bang out on a keyboard, and mathematicians aren't. (In fact, mathematicians seem to *love* inventing new symbols: the guy who invented lambda calculus originally wanted to introduce a new symbol. But when it was sent off to be published, the typesetter mistook his new symbol for a lambda (λ), and it kinda stuck :P) Incidentally, I think the symbols used in mathematics are better if they're available since they're pretty unique, and stand out even better. An interesting thing to try is writing up some CWEB code: it converts all the &&s and ||s to ∧s and ∨s in the TeX documentation :3
 ...
 I actually like symbols in code because they stand out right away.
 I always prefer {braces} to begin/end.
 At the same time, I hate too many symbols too close to each other.
I prefer using names if the names are short and meaningful. It makes code that little less cryptic. As long as you don't end up with insane Similarly, one of the reasons I hate Java is because everyIdentifierIsACompleteAndGrammaticallyCorrectSentence .justBecauseTheyCan(andItMakesWritingLongExpressionsInJava .aTotalPainInTheArse) Ah well, each to their own, I suppose. -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
Nov 09 2006
next sibling parent reply Max Bolingbroke <"batterseapower{no" sp4/\\/\\}hotmail.com> writes:
Daniel Keep wrote:
 
 Hasan Aljudy wrote:
 ...
 ummmm .. mathematicians use more complicated symbols and notations than
 programmers.
It's funny; but the early programming languages were designed by mathematicians. Trust me, if they'd been able to use ∧ for and, and ∨ for or, they would have :) On a few systems, they actually *did*. I think programmers use "simpler" notation simply because we're limited to what we can bang out on a keyboard, and mathematicians aren't.
I heard a story (possibly apocryphal) that the "\" character was actually added to ASCII because people thought you might want to write \/ for or and /\ for and :). Max
Nov 10 2006
parent Bill Baxter <wbaxter gmail.com> writes:
Max Bolingbroke wrote:
 Daniel Keep wrote:
 
 Hasan Aljudy wrote:

 ...
 ummmm .. mathematicians use more complicated symbols and notations than
 programmers.
It's funny; but the early programming languages were designed by mathematicians. Trust me, if they'd been able to use ∧ for and, and ∨ for or, they would have :) On a few systems, they actually *did*. I think programmers use "simpler" notation simply because we're limited to what we can bang out on a keyboard, and mathematicians aren't.
I heard a story (possibly apocryphal) that the "\" character was actually added to ASCII because people thought you might want to write \/ for or and /\ for and :). Max
I don't know about logical operators, but it sure is good for making happy stick figures. \o/ -- "whee! D 1.0" | / \ --bb
Nov 10 2006
prev sibling next sibling parent reply Bill Baxter <wbaxter gmail.com> writes:
Daniel Keep wrote:
 
 (In fact, mathematicians seem to *love* inventing new symbols: the guy
 who invented lambda calculus originally wanted to introduce a new
 symbol.  But when it was sent off to be published, the typesetter
 mistook his new symbol for a lambda (λ), and it kinda stuck :P)
I remember when I was first learning Japanese, it occurred to me "Whoa! now I'll never run out of single-character variable names when doing math equations!" For some reason it didn't actually prove to be that useful, though. Even the Japanese don't use Japanese symbols in their math for some reason, just Roman and Greek letters like everyone else. Every once in a while I'll use an 「ã‚〠to represent some big sub-expression that doesn't have much meaning but keeps on re-appearing in derivations. But that's about it. --bb
Nov 10 2006
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Bill Baxter" <wbaxter gmail.com> wrote in message 
news:ej2gij$ohu$1 digitaldaemon.com...

 I remember when I was first learning Japanese, it occurred to me "Whoa! 
 now I'll never run out of single-character variable names when doing math 
 equations!"

 For some reason it didn't actually prove to be that useful, though. Even 
 the Japanese don't use Japanese symbols in their math for some reason, 
 just Roman and Greek letters like everyone else.  Every once in a while 
 I'll use an ??? to represent some big sub-expression that doesn't have 
 much meaning but keeps on re-appearing in derivations.  But that's about 
 it.
Having taken a few semesters of Japanese, I've noticed I've started to use some kanji in my notes as shorthand :S
Nov 10 2006
parent reply Hasan Aljudy <hasan.aljudy gmail.com> writes:
Jarrett Billingsley wrote:
 "Bill Baxter" <wbaxter gmail.com> wrote in message 
 news:ej2gij$ohu$1 digitaldaemon.com...
 
 I remember when I was first learning Japanese, it occurred to me "Whoa! 
 now I'll never run out of single-character variable names when doing math 
 equations!"

 For some reason it didn't actually prove to be that useful, though. Even 
 the Japanese don't use Japanese symbols in their math for some reason, 
 just Roman and Greek letters like everyone else.  Every once in a while 
 I'll use an ??? to represent some big sub-expression that doesn't have 
 much meaning but keeps on re-appearing in derivations.  But that's about 
 it.
Having taken a few semesters of Japanese, I've noticed I've started to use some kanji in my notes as shorthand :S
Kanji as shorthand? I don't know, I find myself slower when writing kanji (maybe because I'm still a n b in that area), but I can write "nihon" faster than I can write 日本, for instance. (I wonder, can utf-8 encode that?)
Nov 10 2006
parent reply Bill Baxter <wbaxter gmail.com> writes:
Hasan Aljudy wrote:
 
 
 Jarrett Billingsley wrote:
 
 "Bill Baxter" <wbaxter gmail.com> wrote in message 
 news:ej2gij$ohu$1 digitaldaemon.com...

 I remember when I was first learning Japanese, it occurred to me 
 "Whoa! now I'll never run out of single-character variable names when 
 doing math equations!"

 For some reason it didn't actually prove to be that useful, though. 
 Even the Japanese don't use Japanese symbols in their math for some 
 reason, just Roman and Greek letters like everyone else.  Every once 
 in a while I'll use an ??? to represent some big sub-expression that 
 doesn't have much meaning but keeps on re-appearing in derivations.  
 But that's about it.
Having taken a few semesters of Japanese, I've noticed I've started to use some kanji in my notes as shorthand :S
Kanji as shorthand? I don't know, I find myself slower when writing kanji (maybe because I'm still a n b in that area), but I can write "nihon" faster than I can write 日本, for instance. (I wonder, can utf-8 encode that?)
Some are simple, like person,big,small,sun,moon,water,fire,tree,mountain,mother,father... 人 大 å° æ—¥ 月 æ°´ ç« æœ¨ å±± æ¯ã€€çˆ¶ And they don't take up much space in your notes, no matter how complex they are. :-) Anyway, just to bring this slightly back on topic :), since D is utf-8 compatible, I suggest we should allow the use full-width unicode 'and' and 'or' symbols. :-) if ((a∧b)∨(c∧d)) { ... } Mmmm Unicode. That opens up a whole slew of possibilities. How about opDoubleIntegration? No problem! ∬f(x)dx; Oooh and we could allow this as a synonym for delete myVar: ☠ myVar; That would surely push D over the top. Does your language have the skull-and-crossbones operator? I thought not. ;-) --bb
Nov 10 2006
parent reply Georg Wrede <georg.wrede nospam.org> writes:
Bill Baxter wrote:
 Hasan Aljudy wrote:
 
 Jarrett Billingsley wrote:

 "Bill Baxter" <wbaxter gmail.com> wrote in message 
 news:ej2gij$ohu$1 digitaldaemon.com...

 I remember when I was first learning Japanese, it occurred to me 
 "Whoa! now I'll never run out of single-character variable names 
 when doing math equations!"

 For some reason it didn't actually prove to be that useful, though. 
 Even the Japanese don't use Japanese symbols in their math for some 
 reason, just Roman and Greek letters like everyone else.  Every once 
 in a while I'll use an ??? to represent some big sub-expression that 
 doesn't have much meaning but keeps on re-appearing in derivations.  
 But that's about it.
Having taken a few semesters of Japanese, I've noticed I've started to use some kanji in my notes as shorthand :S
Kanji as shorthand? I don't know, I find myself slower when writing kanji (maybe because I'm still a n b in that area), but I can write "nihon" faster than I can write 日本, for instance. (I wonder, can utf-8 encode that?)
Some are simple, like person,big,small,sun,moon,water,fire,tree,mountain,mother,father... 人 大 å° æ—¥ 月 æ°´ ç« æœ¨ å±± æ¯ã€€çˆ¶ And they don't take up much space in your notes, no matter how complex they are. :-)
Hmm, gotta admit UTF is a Good Thing. Or else we couldn't have this conversation here right now. :-)
 Anyway, just to bring this slightly back on topic :), since D is utf-8 
 compatible, I suggest we should allow the use full-width unicode 'and' 
 and 'or' symbols.  :-)
 
     if ((a∧b)∨(c∧d)) {  ... }
APL guys beware, we're retargeting from C(++) !!
 Mmmm Unicode.  That opens up a whole slew of possibilities.
 How about opDoubleIntegration?  No problem!
      ∬f(x)dx;
 Oooh and we could allow this as a synonym for delete myVar:
 
      ☠ myVar;
Hey, that's the warez operator! The delete symbol is †.
 That would surely push D over the top.  Does your language have the 
 skull-and-crossbones operator?  I thought not.
 ;-)
 
 --bb
Nov 12 2006
parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
Georg Wrede wrote:
 Bill Baxter wrote:
 ...
 Mmmm Unicode.  That opens up a whole slew of possibilities.
 How about opDoubleIntegration?  No problem!
      ∬f(x)dx;
 Oooh and we could allow this as a synonym for delete myVar:

      ☠ myVar;
Hey, that's the warez operator! The delete symbol is †. ...
Well, you'd just want to make sure you don't get your objects inexplicably being resurrected days later to give you memory leaks. *ba-dum ching* Still, I'm surprised no-one has claimed the following gems: * ☢ - the Radioactive operator (use instead of "volatile"?) * ☣ - the Biohazard operator (for dirty external declarations?) * ☭ - the "in Soviet Russia" operator (reverses lexical ordering of next statement) * ♨ - the "Hot springs" operator (process goes and takes a break at a relaxing hot spring, coming back ready and rarin' for some number crunching!) * ☃ - the Snowman operator (I... got nothin' on this one) -- Daniel -- Unlike Knuth, I have neither proven or tried the above; it may not even make sense. v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
Nov 12 2006
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Daniel Keep wrote:
 
 Georg Wrede wrote:
 Bill Baxter wrote:
 ...
 Mmmm Unicode.  That opens up a whole slew of possibilities.
 How about opDoubleIntegration?  No problem!
      ∬f(x)dx;
 Oooh and we could allow this as a synonym for delete myVar:

      ☠ myVar;
Hey, that's the warez operator! The delete symbol is †. ...
Well, you'd just want to make sure you don't get your objects inexplicably being resurrected days later to give you memory leaks. *ba-dum ching*
Just need make liberal use of the ☂ operator in that case.
 Still, I'm surprised no-one has claimed the following gems:
 
 * ☢ - the Radioactive operator (use instead of "volatile"?)
 * ☣ - the Biohazard operator (for dirty external declarations?)
 * ☭ - the "in Soviet Russia" operator (reverses lexical ordering of next
 statement)
Too funny.
 * ♨ - the "Hot springs" operator (process goes and takes a break at a
 relaxing hot spring, coming back ready and rarin' for some number
 crunching!)
 * ☃ - the Snowman operator (I... got nothin' on this one)
It must mean "this variable is frozen", a.k.a. const ?? BTW at 12 points, that looks more like "bill the cat" than a snowman. _O -- Ack! --bb
Nov 12 2006
prev sibling parent reply antonio <antonio abrevia.net> writes:
Daniel Keep wrote:
 
 Hasan Aljudy wrote:
 ...
 ummmm .. mathematicians use more complicated symbols and notations than
 programmers.
It's funny; but the early programming languages were designed by mathematicians. Trust me, if they'd been able to use ∧ for and, and ∨ for or, they would have :) On a few systems, they actually *did*. I think programmers use "simpler" notation simply because we're limited to what we can bang out on a keyboard, and mathematicians aren't. (In fact, mathematicians seem to *love* inventing new symbols: the guy who invented lambda calculus originally wanted to introduce a new symbol. But when it was sent off to be published, the typesetter mistook his new symbol for a lambda (λ), and it kinda stuck :P) Incidentally, I think the symbols used in mathematics are better if they're available since they're pretty unique, and stand out even better. An interesting thing to try is writing up some CWEB code: it converts all the &&s and ||s to ∧s and ∨s in the TeX documentation :3
 ...
 I actually like symbols in code because they stand out right away.
 I always prefer {braces} to begin/end.
 At the same time, I hate too many symbols too close to each other.
I prefer using names if the names are short and meaningful. It makes code that little less cryptic. As long as you don't end up with insane Similarly, one of the reasons I hate Java is because everyIdentifierIsACompleteAndGrammaticallyCorrectSentence .justBecauseTheyCan(andItMakesWritingLongExpressionsInJava .aTotalPainInTheArse) Ah well, each to their own, I suppose. -- Daniel
Ok... A good idea could be providing a equivalencies file to the compiler (source + equivalencies), because I prefer to use "y" instead "and". "o" instead "or", "para" instead "for", "mientras" instead "while", "inicio" instead "begin", "final" instead "end" ... Really: Why you introduce the "prevalence" of english over other languages like spanish or catalan or french or italian or... when you have a really universal algebra? Sorry: I'm not nationalist... but I disagree you when you think only on english people. Antonio
Nov 23 2006
parent reply Samuel MV <samuel jxdesigner.com> writes:
Antonio, I'm also spanish and I think would be a big problem to allow 
that: how are you going to share your code? how are you going to work 
with people from other countries or different language? In the Internet 
english is the lingua franca.

English has advantages, like its words usually are shorter, it's spoken 
by most programmers (from all the countries), and there're zillions of 
code written in that language.

In fact, when I'm coding I write whole my programs in english (doc, 
comments, debug code, etc.), I often work with the english keyboard 
layout (because the symbols are better placed), all my programming books 
are in english (most translations sucks!!!), ... for me, programming in 
spanish would be 'unnatural' and annoying when I mix programming languages.

Best regards,

           Samuel.


antonio escribió:
 Daniel Keep wrote:
 Hasan Aljudy wrote:
 ...
 ummmm .. mathematicians use more complicated symbols and notations than
 programmers.
It's funny; but the early programming languages were designed by mathematicians. Trust me, if they'd been able to use ∧ for and, and ∨ for or, they would have :) On a few systems, they actually *did*. I think programmers use "simpler" notation simply because we're limited to what we can bang out on a keyboard, and mathematicians aren't. (In fact, mathematicians seem to *love* inventing new symbols: the guy who invented lambda calculus originally wanted to introduce a new symbol. But when it was sent off to be published, the typesetter mistook his new symbol for a lambda (λ), and it kinda stuck :P) Incidentally, I think the symbols used in mathematics are better if they're available since they're pretty unique, and stand out even better. An interesting thing to try is writing up some CWEB code: it converts all the &&s and ||s to ∧s and ∨s in the TeX documentation :3
 ...
 I actually like symbols in code because they stand out right away.
 I always prefer {braces} to begin/end.
 At the same time, I hate too many symbols too close to each other.
I prefer using names if the names are short and meaningful. It makes code that little less cryptic. As long as you don't end up with insane Similarly, one of the reasons I hate Java is because everyIdentifierIsACompleteAndGrammaticallyCorrectSentence .justBecauseTheyCan(andItMakesWritingLongExpressionsInJava .aTotalPainInTheArse) Ah well, each to their own, I suppose. -- Daniel
Ok... A good idea could be providing a equivalencies file to the compiler (source + equivalencies), because I prefer to use "y" instead "and". "o" instead "or", "para" instead "for", "mientras" instead "while", "inicio" instead "begin", "final" instead "end" ... Really: Why you introduce the "prevalence" of english over other languages like spanish or catalan or french or italian or... when you have a really universal algebra? Sorry: I'm not nationalist... but I disagree you when you think only on english people. Antonio
Nov 24 2006
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Samuel MV wrote:
 Antonio, I'm also spanish and I think would be a big problem to allow 
 that: how are you going to share your code? how are you going to work 
 with people from other countries or different language? In the Internet 
 english is the lingua franca.
 
 English has advantages, like its words usually are shorter, it's spoken 
 by most programmers (from all the countries), and there're zillions of 
 code written in that language.
 
 In fact, when I'm coding I write whole my programs in english (doc, 
 comments, debug code, etc.), I often work with the english keyboard 
 layout (because the symbols are better placed), all my programming books 
 are in english (most translations sucks!!!), ... for me, programming in 
 spanish would be 'unnatural' and annoying when I mix programming languages.
s/spanish/dutch/, s/also // (and maybe a grammar checker :P) and I concur :)
Nov 24 2006