D - Bug: Package names cannot start with digit.
- Robert Medeiros (18/18) Jan 28 2003 Writing a module declaration like, e.g. 'module graphics.3d.mesh;' crash...
- Ilya Minkov (10/34) Jan 28 2003 Though crashing is undesired behaviour, "3d" is not a valid identifier.
- Robert Medeiros (5/9) Jan 28 2003 [snip]
- Sean L. Palmer (9/13) Jan 28 2003 In the math lexicon, it's called R3. You could use that. Except they
- Robert Medeiros (13/17) Jan 29 2003 Actually, I invented that module name for illustration, but it was promp...
- Walter (3/5) Jan 29 2003 You can as of 0.51. But identifiers are still ascii.
- Robert Medeiros (7/10) Jan 29 2003 Probably for the best. Otherwise, it would be entertaining for an hour o...
- factory (12/24) Feb 01 2003 Well if the maintainer doesn't read chinese, it prolly would be. But
-
Daniel Yokomiso
(14/27)
Feb 02 2003
"factory"
escreveu na mensagem - Ilya Minkov (28/53) Feb 03 2003 People which can't get even a couple of words in English right are a
- Evan McClanahan (8/24) Feb 03 2003 I've been working in the Czech Republic, and they do the same thing that...
- Sean L. Palmer (15/21) Feb 03 2003 english.
- Russell Lewis (9/42) Feb 04 2003 Unicode itentifiers and translated keywords sound like another thing
- Daniel Yokomiso (6/27) Feb 04 2003 Actually I wouldn't like it. Most of the libraries I use are written in ...
-
Carlos Santander B.
(22/22)
Feb 04 2003
"Daniel Yokomiso"
escribió en el mensaje - Sean L. Palmer (31/36) Jan 30 2003 What are the plans for extending identifiers to support Unicode? How fa...
- Walter (8/43) Jan 30 2003 I don't have any plans to support non-ascii characters for identifiers. ...
- Sean L. Palmer (36/53) Jan 30 2003 or
- Robert Medeiros (57/86) Jan 30 2003 etc.
- Walter (7/16) Jan 30 2003 True. Reading the source text is just a starting point, at least so that
- Farmer (9/19) Feb 02 2003 D would be light-years ahead of C++ ?
- Sean L. Palmer (6/13) Feb 02 2003 There's a big difference between "thought about it" and "implemented it"...
- Daniel Yokomiso (22/40) Feb 02 2003 IIRC it was indeed a april fool's joke. If not it should, because in som...
Writing a module declaration like, e.g. 'module graphics.3d.mesh;' crashes dmd 0.51 after displaying this error message: position.d(5): ';' expected position.d(5): no identifier for declarator with this crash info (FWIW): DMD caused an invalid page fault in module DMD.EXE at 0177:004040c5. Registers: EAX=0070b038 CS=0177 EIP=004040c5 EFLGS=00010216 EBX=ccccd000 SS=017f ESP=006efd04 EBP=00000472 ECX=00850604 DS=017f ESI=0070b044 FS=3f8f EDX=00000000 ES=017f EDI=0070b038 GS=3f7e Bytes at CS:EIP: 8b 13 56 89 d9 ff 52 14 50 e8 fd d4 07 00 83 c4 Stack dump: 0070aa8c 00850604 00850604 00423388 0070b038 00704ef4 0070b038 00000000 00000000 00704f1c bff713e2 00000177 bff712c5 00003e83 c1758400 bff765d5 Rob
Jan 28 2003
Though crashing is undesired behaviour, "3d" is not a valid identifier. I quote from D manual, "Lexical": "Identifiers start with a letter or _, and are followed by any number of letters, _ or digits. Identifiers can be arbitrarilly long, and are case sensitive. Identifiers starting with __ are reserved." Which is consistent with C behaviour. Not only C. You wouldn't name a variable "3d", would you? :> And lexing engine is simply the same. Not a reason enough for a pagefault, nontheless. -i. Robert Medeiros wrote:Writing a module declaration like, e.g. 'module graphics.3d.mesh;' crashes dmd 0.51 after displaying this error message: position.d(5): ';' expected position.d(5): no identifier for declarator with this crash info (FWIW): DMD caused an invalid page fault in module DMD.EXE at 0177:004040c5. Registers: EAX=0070b038 CS=0177 EIP=004040c5 EFLGS=00010216 EBX=ccccd000 SS=017f ESP=006efd04 EBP=00000472 ECX=00850604 DS=017f ESI=0070b044 FS=3f8f EDX=00000000 ES=017f EDI=0070b038 GS=3f7e Bytes at CS:EIP: 8b 13 56 89 d9 ff 52 14 50 e8 fd d4 07 00 83 c4 Stack dump: 0070aa8c 00850604 00850604 00423388 0070b038 00704ef4 0070b038 00000000 00000000 00704f1c bff713e2 00000177 bff712c5 00003e83 c1758400 bff765d5 Rob
Jan 28 2003
Though crashing is undesired behaviour, "3d" is not a valid identifier.Thanks - I wasn't sure at first if this was a bug or a feature (excluding the crash).I quote from D manual, "Lexical":[snip]Which is consistent with C behaviour. Not only C. You wouldn't name a variable "3d", would you? :> And lexing engine is simply the same.Somehow package "threed" just doesn't have the same ring... :) Rob
Jan 28 2003
In the math lexicon, it's called R3. You could use that. Except they usually use that funny olde-english style R. ;) There's nothing particularly special about 3 dimensions anyway. And 3D or 2D math and transformations certainly aren't limited in use to just graphics. So I question the structure of your library. Do you have a 2D mesh, or a 4D mesh? Sean "Robert Medeiros" <robert.medeiros utoronto.ca> wrote in message news:b17cr4$2qg1$1 digitaldaemon.com...Which is consistent with C behaviour. Not only C. You wouldn't name a variable "3d", would you? :> And lexing engine is simply the same.Somehow package "threed" just doesn't have the same ring... :) Rob
Jan 28 2003
Hi Sean,There's nothing particularly special about 3 dimensions anyway. And 3D or 2D math and transformations certainly aren't limited in use to just graphics. So I question the structure of your library. Do you have a 2D mesh, or a 4D mesh?Actually, I invented that module name for illustration, but it was prompted by an example from the library I'm working on. That's an implementation of the conformal model of geometric algebra, for a research project related to computer vision. Some of the code is generic, i.e. applicable to blades and multivectors of arbitrary dimension (for which I'm trying to apply D templates), but more often that not for my purposes I can get away with hand-crafted code for algebraic entities of fixed dimension (1 -> 5) which can be tweaked for efficiency, hence the 1d, 2d, etc. Your suggestion for using 'rN' notation is a good one that I think I'll adopt. Thanks! As for the gothic 'R' notation: maybe if we get to the point where we can use UTF-?? for our source files... :) Rob
Jan 29 2003
"Robert Medeiros" <robert.medeiros utoronto.ca> wrote in message news:b184a6$srp$1 digitaldaemon.com...As for the gothic 'R' notation: maybe if we get to the point where we can use UTF-?? for our source files... :)You can as of 0.51. But identifiers are still ascii.
Jan 29 2003
canAs for the gothic 'R' notation: maybe if we get to the point where weProbably for the best. Otherwise, it would be entertaining for an hour or so to write all my identifiers in, say, Chinese ideographs -- after which it would just be confusing and a maintenance nightmare. But think of the obfuscated coding contests that one could win with a "feature" like that... one could write a veritable program of Babel... :) Robuse UTF-?? for our source files... :)You can as of 0.51. But identifiers are still ascii.
Jan 29 2003
In article <b19hn4$21fk$1 digitaldaemon.com>, robert.medeiros utoronto.ca says...Well if the maintainer doesn't read chinese, it prolly would be. But for those who can read chinese that prolly wouldn't be a problem. Hmm makes me wonder how most non-english fluent ppl deal with identifiers. After some looking about in usenet, it seems that non- english language users either just deal with the restrictions of ascii, or write their own hacks to make it so that identifiers can be used in their language (either by preprocessing, or changing the parser). This would seem to a bad way of doing it.canAs for the gothic 'R' notation: maybe if we get to the point where weProbably for the best. Otherwise, it would be entertaining for an hour or so to write all my identifiers in, say, Chinese ideographs -- after which it would just be confusing and a maintenance nightmare.use UTF-?? for our source files... :)You can as of 0.51. But identifiers are still ascii.But think of the obfuscated coding contests that one could win with a "feature" like that... one could write a veritable program of Babel... :)If I was entering I'd try and do it all with symbols.. :) - Factory
Feb 01 2003
"factory" <tehdasX optushome.com.au> escreveu na mensagem news:MPG.18a73d5f6a792070989684 news.digitalmars.com... [snip]Well if the maintainer doesn't read chinese, it prolly would be. But for those who can read chinese that prolly wouldn't be a problem. Hmm makes me wonder how most non-english fluent ppl deal with identifiers. After some looking about in usenet, it seems that non- english language users either just deal with the restrictions of ascii, or write their own hacks to make it so that identifiers can be used in their language (either by preprocessing, or changing the parser). This would seem to a bad way of doing it.that...But think of the obfuscated coding contests that one could win with a "feature" likeI'm brazilian and lot's of programmers around here aren't fluent in english. Usually people use plain ascii without any kind of special characters (even in Java), but with portuguese identifiers. Most of our accents (e.g. ~ ` ´) and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-) --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/1/2003one could write a veritable program of Babel... :)If I was entering I'd try and do it all with symbols.. :) - Factory
Feb 02 2003
Daniel Yokomiso wrote:"factory" <tehdasX optushome.com.au> escreveu na mensagem news:MPG.18a73d5f6a792070989684 news.digitalmars.com... [snip]People which can't get even a couple of words in English right are a major plague in any SW development: - english thesis/documents have to be read and worked into software to make it modern and efficient: Even the japanese who are "systematically taught in school to hate english" prefer english for scientific work. - many people aren't able to switch between languages. I'm fluent with english, german, and russian, and understand another couple more, but i always get headaches when i see laguages mixed together. Language keywords are english, identifiers are german (some of them). Horrible, it slows me down reading the code by a factor of at least 2. Someone was irritated here at first, when i in my home assignment have renamed each and every identifier into english, and also wrote all of my comments in english as well. I work a lot with finnish guys, imagine what a catastrophe it would be if they would write comments in finnish, or i in german/russian/whatever... I thow away any piece of source, which contains russian, even though i could read it. My editor can't. :> BTW, i hope you excuse me that i use capitals in text very sparigly, but i'm really fed up with them, since in german every noun is capitalised. My capitalization threshold is being eaten up by both that and programming.Well if the maintainer doesn't read chinese, it prolly would be. But for those who can read chinese that prolly wouldn't be a problem. Hmm makes me wonder how most non-english fluent ppl deal with identifiers. After some looking about in usenet, it seems that non- english language users either just deal with the restrictions of ascii, or write their own hacks to make it so that identifiers can be used in their language (either by preprocessing, or changing the parser). This would seem to a bad way of doing it.D is not for obfuscation. What i have always liked about Delphi, is that foreign code is almost like mine, so i had no major reading problems. D was intended to have the same advantage.But think of the obfuscated coding contests that one could win with a "feature" like that...I'm brazilian and lot's of programmers around here aren't fluent in english. Usually people use plain ascii without any kind of special characters (even in Java), but with portuguese identifiers. Most of our accents (e.g. ~ ` ´) and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-)Most russian programmers are also used to write with ASCII. They call it "Volapyuk encoding". Russian has a completely different set of letters, which is also by about 10 larger than latin, and lies completely in "bit 7 set" area. -i.
Feb 03 2003
Ilya Minkov wrote:I've been working in the Czech Republic, and they do the same thing that Daniel was talking about. just write the word without any of the diacritical marks. It can get really confusing if you're not a native speaker, since the diacriticals disambiguate the words a lot. You get a feeling for it after a while, but wow, can it be a pain in the ass to parse. EvanI'm brazilian and lot's of programmers around here aren't fluent in english. Usually people use plain ascii without any kind of special characters (even in Java), but with portuguese identifiers. Most of our accents (e.g. ~ ` ´) and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-)Most russian programmers are also used to write with ASCII. They call it "Volapyuk encoding". Russian has a completely different set of letters, which is also by about 10 larger than latin, and lies completely in "bit 7 set" area.
Feb 03 2003
"Daniel Yokomiso" <daniel_yokomiso yahoo.com.br> wrote in message news:b1kf9f$1k2l$1 digitaldaemon.com...I'm brazilian and lot's of programmers around here aren't fluent inenglish.Usually people use plain ascii without any kind of special characters(evenin Java), but with portuguese identifiers. Most of our accents (e.g. ~ `´)and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-)Well, wouldn't it be nice if you could just program with Portuguese identifiers? Sure, you'd have to learn the English D keywords (or use a preprocessor to translate those too) I would estimate that at least 50% of all the programs that are made are never seen by anyone but their maker. Little test apps and such. If you don't like accented characters, you could always have a policy against using them. I think it's a nice option though for non-native-English-speakers, and as a nice aside it gets the Unicode ball rolling. ;) Sean
Feb 03 2003
Sean L. Palmer wrote:"Daniel Yokomiso" <daniel_yokomiso yahoo.com.br> wrote in message news:b1kf9f$1k2l$1 digitaldaemon.com...Unicode itentifiers and translated keywords sound like another thing IDEs could do easily. I'm getting more and more enthralled with the idea of IDEs that do more than just colorize your code, or finish an identifier name...IDEs that really change the presentation of the code at a more fundamental level. Frankly, a lot of the features we've suggested at various times (operator overloading, inline function call syntax, even templates) could be done by the IDE acting as a preprocessor.I'm brazilian and lot's of programmers around here aren't fluent inenglish.Usually people use plain ascii without any kind of special characters(evenin Java), but with portuguese identifiers. Most of our accents (e.g. ~ `´)and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-)Well, wouldn't it be nice if you could just program with Portuguese identifiers? Sure, you'd have to learn the English D keywords (or use a preprocessor to translate those too) I would estimate that at least 50% of all the programs that are made are never seen by anyone but their maker. Little test apps and such. If you don't like accented characters, you could always have a policy against using them. I think it's a nice option though for non-native-English-speakers, and as a nice aside it gets the Unicode ball rolling. ;) Sean
Feb 04 2003
In article <b1nsls$1186$1 digitaldaemon.com>, Sean L. Palmer says..."Daniel Yokomiso" <daniel_yokomiso yahoo.com.br> wrote in message news:b1kf9f$1k2l$1 digitaldaemon.com...Actually I wouldn't like it. Most of the libraries I use are written in english (maybe all of them, but now I don't want to review it ;-) ). It's very weird to write: "File algumArquivo = new File('temp.txt');" instead of "File someFile = new File('temp.txt');". It's not only the keywords, but every library you use. If you stick to english the context changes will be less frequent. But YMMV.I'm brazilian and lot's of programmers around here aren't fluent inenglish.Usually people use plain ascii without any kind of special characters(evenin Java), but with portuguese identifiers. Most of our accents (e.g. ~ `´)and the "ç" letter are just avoided. So instead of "exceção" (I don't know if it'll be displayed correctly) is written "excecao" and people don't complain ;-)Well, wouldn't it be nice if you could just program with Portuguese identifiers? Sure, you'd have to learn the English D keywords (or use a preprocessor to translate those too) I would estimate that at least 50% of all the programs that are made are never seen by anyone but their maker. Little test apps and such. If you don't like accented characters, you could always have a policy against using them. I think it's a nice option though for non-native-English-speakers, and as a nice aside it gets the Unicode ball rolling. ;) Sean
Feb 04 2003
"Daniel Yokomiso" <Daniel_member pathlink.com> escribió en el mensaje news:b1pohj$2789$1 digitaldaemon.com... | Actually I wouldn't like it. Most of the libraries I use are written in english | (maybe all of them, but now I don't want to review it ;-) ). It's very weird to | write: "File algumArquivo = new File('temp.txt');" instead of "File someFile = | new File('temp.txt');". It's not only the keywords, but every library you use. | If you stick to english the context changes will be less frequent. But YMMV. | | I don't find it weird at all. As long as I can, I write all my code in Spanish. What you said is very relative... ————————————————————————— Carlos Santander --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 2003-01-27
Feb 04 2003
What are the plans for extending identifiers to support Unicode? How far are you willing to go? ;) At very least, accented latin characters should be accepted in identifiers. It might be nice if the language ignored the accents (but then again I think case should be ignored too). I *really* want to be able to use the extra math symbols in Unicode as operators. I could give you either a short list or a long list of the ones I would want. Just allowing any Unicode character that is considered a symbol or mathematical operator would be fine too. The ones that are most direly needed are dot product (U+22C5 although there are several similar symbols) cross product (U+00D7) The reason we need these is that they're ultra common operations that have higher precedence than multiply, meaning none of the available overloadable operators has the right precedence. but it'd also be nice to have: division operator (U+00F7) set union and intersection set membership logical operators (and, or, xor, nor, nand, not) comparison operators (single symbol support for <=, >=, !=, etc plus "almost equal" for floats) single symbol support for <<, >> And I could go on and on. Sean ----- Original Message ----- From: "Walter" <walter digitalmars.com> Newsgroups: D Sent: Wednesday, January 29, 2003 10:40 AM Subject: Re: Bug: Package names cannot start with digit."Robert Medeiros" <robert.medeiros utoronto.ca> wrote in message news:b184a6$srp$1 digitaldaemon.com...canAs for the gothic 'R' notation: maybe if we get to the point where weuse UTF-?? for our source files... :)You can as of 0.51. But identifiers are still ascii.
Jan 30 2003
"Sean L. Palmer" <seanpalmer directvinternet.com> wrote in message news:b1bst9$15nl$1 digitaldaemon.com...What are the plans for extending identifiers to support Unicode? How far are you willing to go? ;)I don't have any plans to support non-ascii characters for identifiers. The unicode support is for strings and comments.I *really* want to be able to use the extra math symbols in Unicode as operators. I could give you either a short list or a long list of theonesI would want. Just allowing any Unicode character that is considered a symbol or mathematical operator would be fine too.That has a much more compelling case for it <g>.The ones that are most direly needed are dot product (U+22C5 although there are several similar symbols) cross product (U+00D7) The reason we need these is that they're ultra common operations that have higher precedence than multiply, meaning none of the availableoverloadableoperators has the right precedence. but it'd also be nice to have: division operator (U+00F7) set union and intersection set membership logical operators (and, or, xor, nor, nand, not) comparison operators (single symbol support for <=, >=, !=, etc plus"almostequal" for floats) single symbol support for <<, >> And I could go on and on. Sean ----- Original Message ----- From: "Walter" <walter digitalmars.com> Newsgroups: D Sent: Wednesday, January 29, 2003 10:40 AM Subject: Re: Bug: Package names cannot start with digit."Robert Medeiros" <robert.medeiros utoronto.ca> wrote in message news:b184a6$srp$1 digitaldaemon.com...canAs for the gothic 'R' notation: maybe if we get to the point where weuse UTF-?? for our source files... :)You can as of 0.51. But identifiers are still ascii.
Jan 30 2003
"Robert Medeiros" <robert.medeiros utoronto.ca> wrote in message news:b184a6$srp$1 digitaldaemon.com...Hi Sean,orThere's nothing particularly special about 3 dimensions anyway. And 3D2D2D math and transformations certainly aren't limited in use to just graphics. So I question the structure of your library. Do you have apromptedmesh, or a 4D mesh?Actually, I invented that module name for illustration, but it wasby an example from the library I'm working on. That's an implementation of the conformal model of geometric algebra, for a research project relatedtocomputer vision. Some of the code is generic, i.e. applicable to bladesandmultivectors of arbitrary dimension (for which I'm trying to apply D templates), but more often that not for my purposes I can get away with hand-crafted code for algebraic entities of fixed dimension (1 -> 5) which can be tweaked for efficiency, hence the 1d, 2d, etc. Your suggestion for using 'rN' notation is a good one that I think I'll adopt. Thanks!Awesome! I recently became very interested in geometric algebra and am getting to the point of familiarity with it that I can write a multivector class or write code that prints out all the individual adds and multiplies involved in any arbitrary grade vs. grade product. I've already made some use of that stuff to optimize my quaternion transforming point function etc. I think it's a great idea to make a geometric algebra template. Have a look at Boost::clifford ( supposed to be at http://jaap.flipcode.com/ga/ but seems down currently ) I would love to see what you come up with or even help out with ideas or implementation. In my C++ math library I use a graded system like you say, where mixing different ranks together gives certain result types containing only the nonzero portion of the resulting multivector. Keeping track of which grades are nonempty in a template would add complexity but would make it generate really efficient code and storage. There would be no real reason to have special classes for points, vectors, and spinors, you could just use multivector for everything. That sounds ideal, but may require some extensions to the existing template support to make it possible. Once we have that, we would no longer need the complex type at all; it would subsume the role of quaternion, complex, and in fact most 3D vector/plane/sphere/ray types wouldn't be necessary.As for the gothic 'R' notation: maybe if we get to the point where we can use UTF-?? for our source files... :)Supposedly DMD 0.51 will read UTF-8 files as input but the lexer doesn't like any characters outside the ascii range and will complain about them. Being able to actually overload the cross product and dot product, paragraph, dagger, left contraction symbols as operators would be fantastic! The little superscript 2 could be Square, of course there's square root symbol, ALL KINDS of good stuff in Unicode for what we need. And it wouldn't have to be hacks, provided the language supported those things being overloaded. Even if the precedence defaulted to the highest possible it would still be light-years ahead of C++.Rob
Jan 30 2003
Awesome! I recently became very interested in geometric algebra and am getting to the point of familiarity with it that I can write a multivector class or write code that prints out all the individual adds and multiplies involved in any arbitrary grade vs. grade product. I've already made some use of that stuff to optimize my quaternion transforming point functionetc. I'm fairly recent to GA myself, only having discovered it this past summer. It's fascinating stuff, isn't it? If you're like me at all, you probably started reading, got mad that your grade school teachers didn't teach it like that, and then became a True Believer, and started evangelizing to friends, family, and strangers alike... :)I think it's a great idea to make a geometric algebra template. Have alookat Boost::clifford ( supposed to be at http://jaap.flipcode.com/ga/ but seems down currently ) I would love to see what you come up with or even help out with ideas or implementation.Thanks for the pointer -- I hadn't seen that page before; if you haven't already visited: http://carol.wins.uva.nl/~leo/clifford/ you might want to. It's a nice list of GA related resources. I'll be glad to share the code once this project is a bit closer to completion. Actually, I'm porting from a C++ codebase already written, and so some cycles are getting spent just making things D-like, particularly rearranging code to accomodate the notion of modules, sticking once separate unit tests into the corresponding modules, etc. A fair amount of the design-work is done, but if you have any suggestions for a better way to do things, well, I've rewritten "finished" code a time or two before... :)In my C++ math library I use a graded system like you say, where mixing different ranks together gives certain result types containing only the nonzero portion of the resulting multivector. Keeping track of whichgradesare nonempty in a template would add complexity but would make it generate really efficient code and storage. There would be no real reason to have special classes for points, vectors, and spinors, you could just use multivector for everything. That sounds ideal, but may require some extensions to the existing template support to make it possible.I was trying to avoid general multivector usage in favour of fixed-grade elements for reasons of efficiency (it seemed wasteful to store all those zero coefficients for a scalar, for instance), but I've recently started thinking that maybe that's the wrong way to go about things. Perhaps it's better to focus on making a high-quality, general multivector implementation as you say (particularly if the template tracked the non-zero components as you describe), getting more readable and maintainable code as a result, and letting Moore deal with speed and storage concerns. I need to think about this some more, but IIRC this is the way GABLE is implemented (a MATLAB tutorial package for GA). Perhaps the added complexity of tracking zero coefficients won't even be worth the storage gains, and where speed is a concern it might be interesting to try mapping multivector operations onto matrices to try getting a speed boost out of graphics hardware, at least for Euclidean multivectors we use in graphics, computer vision, etc.Once we have that, we would no longer need the complex type at all; it would subsume the role of quaternion, complex, and in fact most 3D vector/plane/sphere/ray types wouldn't be necessary.<nod> I think 'complex' is nearing obsolescence. Of course, it won't really go away until someone grows up having learned their maths without it, but we can start by avoiding it ourselves I suppose. The transition might be made easier by replacing complex with an equivalent bivector that behaves almost identically, and leaving the more general multivector mechanism you describe for those interested in the "new math". :) It would certainly be interesting to have it defined as part of D, as the 'complex' type currently is. It might be better though to leave it in Phobos/Deimos so different models of GA can be accomodated without mandating a single standard. It seems that GA software is still maturing; implementations still seem to be chasing a running target as the mathmatics itself is still evolving at a fair clip, relatively speaking.Supposedly DMD 0.51 will read UTF-8 files as input but the lexer doesn't like any characters outside the ascii range and will complain about them. Being able to actually overload the cross product and dot product, paragraph, dagger, left contraction symbols as operators would befantastic!The little superscript 2 could be Square, of course there's square root symbol, ALL KINDS of good stuff in Unicode for what we need. And it wouldn't have to be hacks, provided the language supported those things being overloaded. Even if the precedence defaulted to the highestpossibleit would still be light-years ahead of C++.I have to admit, I like the thought of being able to overload various mathematical operators, and other symbols. The only difficulty I see is in readability. As things stand, my preference for algebraic notation looks like this (with some personal modifications tacked on): http://www.cs.toronto.edu/~hehner/UA.pdf and others are likely to use those same symbols for very different purposes. 'Seems as though we'd need to adopt new symbols into the language with a canonical meaning, in the same way that '+' has a standard meaning, whose function in well-designed software should be deducible from the context. Rob
Jan 30 2003
"Sean L. Palmer" <seanpalmer directvinternet.com> wrote in message news:b1bs19$14ik$1 digitaldaemon.com...Supposedly DMD 0.51 will read UTF-8 files as input but the lexer doesn't like any characters outside the ascii range and will complain about them.True. Reading the source text is just a starting point, at least so that utf-16, etc., text editors can be used.Being able to actually overload the cross product and dot product, paragraph, dagger, left contraction symbols as operators would befantastic!The little superscript 2 could be Square, of course there's square root symbol, ALL KINDS of good stuff in Unicode for what we need. And it wouldn't have to be hacks, provided the language supported those things being overloaded. Even if the precedence defaulted to the highestpossibleit would still be light-years ahead of C++.It would probably have to be the highest precedence.
Jan 30 2003
"Sean L. Palmer" <seanpalmer directvinternet.com> wrote in news:b1bs19$14ik$1 digitaldaemon.com:Supposedly DMD 0.51 will read UTF-8 files as input but the lexer doesn't like any characters outside the ascii range and will complain about them. Being able to actually overload the cross product and dot product, paragraph, dagger, left contraction symbols as operators would be fantastic! The little superscript 2 could be Square, of course there's square root symbol, ALL KINDS of good stuff in Unicode for what we need. And it wouldn't have to be hacks, provided the language supported those things being overloaded. Even if the precedence defaulted to the highest possible it would still be light-years ahead of C++.D would be light-years ahead of C++ ? Stroustrup thought about exploiting unicode for extended overloading in C++, almost five years ago. B Stroustrup: Generalizing Overloading for C++2000. Overload, Issue 25. April 1, 1998 <g> <http://www.research.att.com/~bs/whitespace98.pdf> Farmer.
Feb 02 2003
There's a big difference between "thought about it" and "implemented it". Yeah, I guess that paper was an april fools joke. But some of what's in there could actually be worth pursuing. Sean "Farmer" <itsFarmer. freenet.de> wrote in message news:Xns9316E669FBA21itsFarmer 63.105.9.61...D would be light-years ahead of C++ ? Stroustrup thought about exploiting unicode for extended overloading in C++, almost five years ago. B Stroustrup: Generalizing Overloading for C++2000. Overload, Issue 25. April 1, 1998 <g> <http://www.research.att.com/~bs/whitespace98.pdf> Farmer.
Feb 02 2003
"Sean L. Palmer" <seanpalmer directvinternet.com> escreveu na mensagem news:b1k70j$1fkr$1 digitaldaemon.com...There's a big difference between "thought about it" and "implemented it". Yeah, I guess that paper was an april fools joke. But some of what's in there could actually be worth pursuing. Sean "Farmer" <itsFarmer. freenet.de> wrote in message news:Xns9316E669FBA21itsFarmer 63.105.9.61...IIRC it was indeed a april fool's joke. If not it should, because in some parts he talks about giving the default identifier name length to be just 1 character, and overload the "empty space" operator for ints to be multiplication, so "x=yzw" is "x = y * z * w". I think the idea of using unicode characters for certain operators would be a great idea for code editing, but not for the language. It looks a good idea, but code is usually linear, and I want to write e = mc2 with superscripting instead of lousy power of operators ;-) The same goes for division or linear algebra. Maybe D could always associate a operator with an operation, even for new operators, and IDE's could make use of this: // default operators alias '+' add; alias '*' mul; // my module operators alias "unicode for cross product goes here" cross; or even allowing per-module aliasing of operators. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.449 / Virus Database: 251 - Release Date: 27/1/2003D would be light-years ahead of C++ ? Stroustrup thought about exploiting unicode for extended overloading in C++, almost five years ago. B Stroustrup: Generalizing Overloading for C++2000. Overload, Issue 25. April 1, 1998 <g> <http://www.research.att.com/~bs/whitespace98.pdf> Farmer.
Feb 02 2003