Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I understand that it has to do with preventing accidental hijacking alias Parent.methodA methodA; void methodA(long x){...} } void

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 08:34, Matthew Ong wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I understand that it has to do with preventing accidental hijacking alias Parent.methodA methodA; void

Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
Hi, From what I can see,... The documentation seems to be making something simple harder to understand with lots of noises added. It is scattered all over the places. Many information Seem like a lot of dark/unwritten known by only a few persons. 1) There is No clear organizations.

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
On 5/27/2011 2:54 PM, Jacob Carlborg wrote: Hi Jacob, See some of the source code shown here. I did not code them, but can sense the pattern is not too productive brain cycle invested. Cycle= trying to locate up the tree of inherited object. BTW, default D documentation is Not too friendly

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 02:34:34 -0400, Matthew Ong on...@yahoo.com wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I understand that it has to do with preventing accidental

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
The docs show the syntax and code fragments, not entire compilable examples. Although if you provide a main() and copy the code, with some slight adjustments it should work. In cases where it's obvious that a code sample would not compile due to some typo or mistake, you can file a bug report. If

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 09:35, Matthew Ong wrote: Hi, From what I can see,... The documentation seems to be making something simple harder to understand with lots of noises added. It is scattered all over the places. Many information Seem like a lot of dark/unwritten known by only a few persons. 1)

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: On Fri, 27 May 2011 02:34:34 -0400, Matthew Ong on...@yahoo.com wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I understand that it has

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/27/2011 7:13 PM, Andrej Mitrovic wrote: If there's missing documentation, file a bug report. Will do that soon. Otherwise the docs are not a tutorial for the language. If there ever will be a tutorial that's hosted on the D website it will probably be in a section of its own. Foo/Bar

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 07:42:17 -0400, Matthew Ong on...@yahoo.com wrote: On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: I don't think it will work that well. Consider how function hijacking happens. For instance, the parent class author may not even know his code is being overridden, and he

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/27/2011 7:27 PM, Jacob Carlborg wrote: On 2011-05-27 09:35, Matthew Ong wrote: The documentation on the DigitalMars site is more of a language reference than a tutorial. It's probably not the best place to start but when you know the language is good to be able to look some odd syntax you

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
I'm not sure how Vehicles or Bank Account is going to help describe access modifiers. There's no connection, and will end up confusing the reader. Foo and Bar are used when the focus is not on the semantics but on the syntax of the language. On the other hand, if you're going to explain

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
On 5/27/2011 8:08 PM, Steven Schveighoffer wrote: Sorry, I used the wrong term, I meant derived or extended. Explain please. You lost me. If I am not wrong, final is used to prevent overriding. Is that what you are talking about? Yes, but you marked the child as inheritall, doesn't this

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/27/2011 8:13 PM, Andrej Mitrovic wrote: that just show the syntax of the language, I think foobar is ok. I totally agree, I wrote that I think. However, the problem are clearly seen here at least: http://www.digitalmars.com/d/2.0/operatoroverloading.html # people done C++ can understand

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Mike James
Matthew Ong on...@yahoo.com wrote in message news:iro4gg$1763$1...@digitalmars.com... On 5/27/2011 7:27 PM, Jacob Carlborg wrote: On 2011-05-27 09:35, Matthew Ong wrote: The documentation on the DigitalMars site is more of a language reference than a tutorial. It's probably not the best place

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread dennis luehring
Am 27.05.2011 14:08, schrieb Matthew Ong: On 5/27/2011 7:27 PM, Jacob Carlborg wrote: On 2011-05-27 09:35, Matthew Ong wrote: The documentation on the DigitalMars site is more of a language reference than a tutorial. It's probably not the best place to start but when you know the language

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
On 5/27/11, Matthew Ong on...@yahoo.com wrote: http://www.digitalmars.com/d/2.0/operatoroverloading.html # people done C++ can understand others may not. Well, explaining the concept of operator overloading should be a separate topic. People who know what operator overloading is will look in

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 08:36:08 -0400, Matthew Ong on...@yahoo.com wrote: On 5/27/2011 8:08 PM, Steven Schveighoffer wrote: Sorry, I used the wrong term, I meant derived or extended. Explain please. You lost me. If I am not wrong, final is used to prevent overriding. Is that what you are

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 09:22:01 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 5/27/11, Matthew Ong on...@yahoo.com wrote: http://www.digitalmars.com/d/2.0/operatoroverloading.html # people done C++ can understand others may not. Well, explaining the concept of operator

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 13:42, Matthew Ong wrote: On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: Do you have cases where you have to alias all over the place? news://news.digitalmars.com:119/iri4am$2dl3$1...@digitalmars.com

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 14:08, Steven Schveighoffer wrote: On Fri, 27 May 2011 07:42:17 -0400, Matthew Ong on...@yahoo.com wrote: On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: I don't think it will work that well. Consider how function hijacking happens. For instance, the parent class author may

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 09:43:39 -0400, Jacob Carlborg d...@me.com wrote: On 2011-05-27 14:08, Steven Schveighoffer wrote: I may see why you see so many cases -- dwt was likely ran through a java to d converter, and such converters often add unnecessary lines, because it is easier to do that

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 1:34 AM, Matthew Ong wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I understand that it has to do with preventing accidental hijacking alias Parent.methodA methodA; void

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/27/2011 9:16 PM, dennis luehring wrote: better and better -- YES - your talking mostly to sparetime developers here I have some sense that is the case here because of different email domain from so many different coder. No wonder there does not seem to be properly organized. There is

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 10:10:25 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/27/11 1:34 AM, Matthew Ong wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int x){...} } class Child : Parent{ // I

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
On 5/27/2011 9:37 PM, Jacob Carlborg wrote: On 2011-05-27 13:42, Matthew Ong wrote: On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: Maybe you are not doing something correctly, you shouldn't need this feature all the time. Not me, others that has coded the dwt and I suspect other code in

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 9:26 AM, Steven Schveighoffer wrote: On Fri, 27 May 2011 10:10:25 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/27/11 1:34 AM, Matthew Ong wrote: Hi All, Currently within D, to make use of a parent class method you have to do: class Parent{ void methodA(int

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 10:54:14 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: It is completely against the spirit of the language to decide that a call is resolved to an invalid method during runtime. There is no other feature remotely related to hiddenfunc. A couple of

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Alexander Battisti
Just starting myself with D, I can second that. This ( http://warpspire.com/talks/documentation/ ) explains much better than I could, how important documentation is. The best type of tutorial and documentation format I have seen so far and yet simple to understand are shown here.

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
Every other word in that presentation is Awesome. It looks like an Apple advertisement. Besides, we already have ddoc for generating documentation. And that really only applies to Phobos, not the language docs.

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 11:35 AM, Andrej Mitrovic wrote: Every other word in that presentation is Awesome. It looks like an Apple advertisement. I got curious and clicked on a few referred links - which one are you referring to? Andrei

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 10:04 AM, Steven Schveighoffer wrote: On Fri, 27 May 2011 10:54:14 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: It is completely against the spirit of the language to decide that a call is resolved to an invalid method during runtime. There is no other feature

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 12:35 AM, Andrej Mitrovic wrote: Every other word in that presentation is Awesome. It looks like an Apple advertisement. Besides, we already have ddoc for generating documentation. And that really only applies to Phobos, not the language docs. Alexander, You sounded like a young

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Dejan Lekic
A couple of years ago, Walter gave a talk on hijacking to NWCPP. It all went well until HiddenFunc, at which point Walter's assertion that the way out was by throwing an exception was hotly debated. Several people suggested alternative, of whom one proposed (4) above. Everybody agreed it's a good

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Alexander Battisti
Every other word in that presentation is  Awesome. It looks like an Apple advertisement. Then it obviously must have no value at all :) Besides, we already have ddoc for generating documentation. I was not implying that D was lacking tools. I meant to say, that documentation is - apart from

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Alexander Battisti
You sounded like a young chap, when was your first programming language, what year? Basic and Logo on my Amstrad CPC 64 (around 1996?) ... so I am not sooo young anymore, but thanks nonetheless :)

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
On 5/27/11, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/27/11 11:35 AM, Andrej Mitrovic wrote: Every other word in that presentation is Awesome. It looks like an Apple advertisement. I got curious and clicked on a few referred links - which one are you referring to?

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Adam D. Ruppe
If D is able to come up with some form of sandbox tutorial environment http://golang.org/doc/playground.html It's already been done, just with a few bugs. It runs real D on code examples. It will hopefully be merged with the next release.

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Matthew Ong
On 5/27/2011 10:10 PM, Andrei Alexandrescu wrote: On 5/27/11 1:34 AM, Matthew Ong wrote: Hi All, At least not using foo and bar, I am able to understand some of that is being discussed here. Thank you all. 2 is just annoying. For the sake of backward compatibility, keep that machination.

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 1:01 AM, Alexander Battisti wrote: Every other word in that presentation is Awesome. It looks like an Apple advertisement. Then it obviously must have no value at all :) Besides, we already have ddoc for generating documentation. I was not implying that D was lacking tools. I

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 1:17 AM, Adam D. Ruppe wrote: If D is able to come up with some form of sandbox tutorial environment http://golang.org/doc/playground.html It's already been done, just with a few bugs. It runs real D on code examples. It will hopefully be merged with the next release. Wonderful,

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 06:31, Steven Schveighoffer wrote: On Fri, 27 May 2011 09:22:01 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 5/27/11, Matthew Ong on...@yahoo.com wrote: http://www.digitalmars.com/d/2.0/operatoroverloading.html # people done C++ can understand others may not.

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 1:09 AM, Alexander Battisti wrote: Basic and Logo on my Amstrad CPC 64 (around 1996?) ... so I am not sooo young anymore, but thanks nonetheless :) My was turbo C++ on MS DOS 6.22 around 1995. I think we might be in the same age range. -- Matthew Ong email: on...@yahoo.com

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 1:06 PM, Dejan Lekic wrote: A couple of years ago, Walter gave a talk on hijacking to NWCPP. It all went well until HiddenFunc, at which point Walter's assertion that the way out was by throwing an exception was hotly debated. Several people suggested alternative, of whom one proposed

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread KennyTM~
On May 28, 11 01:19, Matthew Ong wrote: On 5/28/2011 1:17 AM, Adam D. Ruppe wrote: If D is able to come up with some form of sandbox tutorial environment http://golang.org/doc/playground.html It's already been done, just with a few bugs. It runs real D on code examples. It will hopefully be

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 1:24 AM, Jonathan M Davis wrote: On 2011-05-27 06:31, Steven Schveighoffer wrote: LOL. Yeah. Java will never have operator overloading. That would be on the list of features that were considered unsafe. And I know plenty of folks who are against operator overloading for similar

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Andrej Mitrovic
D has lambdas and closures and plenty of other things. It doesn't have a lot of runtime-introspection though, it doesn't run on a VM I'm affraid. :)

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Matthew Ong
On 5/28/2011 1:31 AM, KennyTM~ wrote: On May 28, 11 01:19, Matthew Ong wrote: On 5/28/2011 1:17 AM, Adam D. Ruppe wrote: You can check a sample in http://arsdnet.net/d-web-site/std_algorithm2.html. Ah... good idea. Very close to that. Perhaps format like coffee using more interesting side

std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Vladimir Panteleev
Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/std/range.d#L767 Would it make sense to introduce a hasOpaqueLength oslt. to fix this? -- Best regards, Vladimirmailto:vladi...@thecybershadow.net

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 11:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/ std/range.d#L767 Would it make sense to introduce a hasOpaqueLength oslt. to fix this? Um. Why? What would it give you? hasLength is

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread KennyTM~
On May 28, 11 02:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/std/range.d#L767 Would it make sense to introduce a hasOpaqueLength oslt. to fix this? You mean std.array.join? The 2-argument overload

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Vladimir Panteleev
On Fri, 27 May 2011 21:18:40 +0300, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-05-27 11:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/ std/range.d#L767 Would it make sense to introduce a

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Steven Schveighoffer
On Fri, 27 May 2011 13:25:51 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/27/11 1:06 PM, Dejan Lekic wrote: A couple of years ago, Walter gave a talk on hijacking to NWCPP. It all went well until HiddenFunc, at which point Walter's assertion that the way out was by

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 11:25, Vladimir Panteleev wrote: On Fri, 27 May 2011 21:18:40 +0300, Jonathan M Davis jmdavisp...@gmx.com wrote: On 2011-05-27 11:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302 df/

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Vladimir Panteleev
On Fri, 27 May 2011 21:29:10 +0300, KennyTM~ kenn...@gmail.com wrote: On May 28, 11 02:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/std/range.d#L767 Would it make sense to introduce a hasOpaqueLength

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread KennyTM~
On May 28, 11 02:51, Vladimir Panteleev wrote: On Fri, 27 May 2011 21:29:10 +0300, KennyTM~ kenn...@gmail.com wrote: On May 28, 11 02:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302df/std/range.d#L767

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Jesse Phillips
Matthew Ong Wrote: Perhaps format like coffee using more interesting side by side comparison and with more writefln/writeln rather than assert. Assert does not show anything visually. I understand this position and that new programers of D find it odd that examples don't have any output.

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 11:51, Vladimir Panteleev wrote: On Fri, 27 May 2011 21:29:10 +0300, KennyTM~ kenn...@gmail.com wrote: On May 28, 11 02:05, Vladimir Panteleev wrote: Why hasLength!string is false: https://github.com/D-Programming-Language/phobos/blob/96941d5384a5fee302 df/std/range.d#L767

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 16:09, Steven Schveighoffer wrote: On Fri, 27 May 2011 09:43:39 -0400, Jacob Carlborg d...@me.com wrote: On 2011-05-27 14:08, Steven Schveighoffer wrote: I may see why you see so many cases -- dwt was likely ran through a java to d converter, and such converters often add

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 16:18, Matthew Ong wrote: On 5/27/2011 9:16 PM, dennis luehring wrote: better and better -- YES - your talking mostly to sparetime developers here I have some sense that is the case here because of different email domain from so many different coder. No wonder there does not

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Walter Bright
On 5/27/2011 12:02 PM, Jesse Phillips wrote: Matthew Ong Wrote: Perhaps format like coffee using more interesting side by side comparison and with more writefln/writeln rather than assert. Assert does not show anything visually. I understand this position and that new programers of D find it

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 16:38, Matthew Ong wrote: On 5/27/2011 9:37 PM, Jacob Carlborg wrote: On 2011-05-27 13:42, Matthew Ong wrote: On 5/27/2011 7:08 PM, Steven Schveighoffer wrote: Maybe you are not doing something correctly, you shouldn't need this feature all the time. Not me, others that has

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Andrei Alexandrescu
On 5/27/11 2:00 PM, Jonathan M Davis wrote: On 2011-05-27 11:51, Vladimir Panteleev wrote: [snip] Create a bug report and I'll look into it. - Jonathan M Davis Thank you, Vladimir and even more so Jonathan! Andrei

Re: What's the status of the review queue?

2011-05-27 Thread Lars T. Kyllingstad
On Thu, 26 May 2011 12:01:00 -0700, Jonathan M Davis wrote: What's the state of your update to std.path? Have you had time to get back to it yet? Actually, I'd say it's ready. I'll integrate it with the rest of Phobos and put it up for review as soon as the TempAlloc review is done. -Lars

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 19:24, Jonathan M Davis wrote: On 2011-05-27 06:31, Steven Schveighoffer wrote: On Fri, 27 May 2011 09:22:01 -0400, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: On 5/27/11, Matthew Ongon...@yahoo.com wrote: http://www.digitalmars.com/d/2.0/operatoroverloading.html #

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 12:33, Andrei Alexandrescu wrote: On 5/27/11 2:00 PM, Jonathan M Davis wrote: On 2011-05-27 11:51, Vladimir Panteleev wrote: [snip] Create a bug report and I'll look into it. - Jonathan M Davis Thank you, Vladimir and even more so Jonathan! Well, I'm in the midst of

Re: Could new keyword help function hijacking and prevented aliasing all over the place??

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 12:27, Jacob Carlborg wrote: On 2011-05-27 16:38, Matthew Ong wrote: On 5/27/2011 9:37 PM, Jacob Carlborg wrote: When coding my own projects (projects I've written from scratch and not ported from other languages) it's a feature I rarely use, don't know if I ever have used

Re: What's the status of the review queue?

2011-05-27 Thread Jonathan M Davis
On 2011-05-27 12:40, Lars T. Kyllingstad wrote: On Thu, 26 May 2011 12:01:00 -0700, Jonathan M Davis wrote: What's the state of your update to std.path? Have you had time to get back to it yet? Actually, I'd say it's ready. I'll integrate it with the rest of Phobos and put it up for

Re: std.string.join co. do a character-by-character copy because hasLength!string is false

2011-05-27 Thread Vladimir Panteleev
On Fri, 27 May 2011 22:00:35 +0300, Jonathan M Davis jmdavisp...@gmx.com wrote: Create a bug report and I'll look into it. http://d.puremagic.com/issues/show_bug.cgi?id=6064 . Thanks! I had a look into fixing it myself, but the changes required are not trivial - joiner always returns a

Re: Example within documentations of D seriously need some improvement.

2011-05-27 Thread David Nadlinger
On 5/27/11 9:09 PM, Jacob Carlborg wrote: On 2011-05-27 16:18, Matthew Ong wrote: On 5/27/2011 9:16 PM, dennis luehring wrote: […] that YOU can start imeditately by bringing in new/changed content - would be great It is too early for me to do that as I am just 3 week in D. Maybe that's

Handy API examples for HTTP requests

2011-05-27 Thread bearophile
I've seen this with some examples of handy API for HTTP requests, useful for the Phobos devs that want to add a Phobos module to perform such things: http://pydanny.blogspot.com/2011/05/python-http-requests-for-humans.html http://pypi.python.org/pypi/requests Bye, bearophile

Re: Handy API examples for HTTP requests

2011-05-27 Thread Adam D. Ruppe
My D curl wrapper (hopefully soon to be obsolete by a std.curl thing) does it this way: string response = curl(url); // does a GET on the url string response = curl(url, some_post_data); // does a POST string response = curl(url, some_post_data, post_content_type); // POST with a special

Re: DustMite, a D test case minimization tool

2011-05-27 Thread Vladimir Panteleev
On Thu, 26 May 2011 09:58:33 +0300, Don nos...@nospam.com wrote: This is fantastic for ICE bugs. But it doesn't work well for certain types of bugs, such as the one I tracked down recently, which are of the form: I've improved DustMite with your suggestions, and added the

How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Matthew Ong
Hi All, The main aim here is to find out how to model similar syntax within D. Due to the nature of the architecture of the library that I have designed in Java and heavily leans towards interface generics. It works well with java. Yes. I am aware about Tuple to allow me to do multiple value

Re: What is the design reasons for Not considering base class overloaded

2011-05-27 Thread Matthew Ong
On 5/25/2011 5:43 PM, bearophile wrote: alias A.foo foo; // ### Why the extra steps is needed for the compiler to 'know' overloaded functions from base classes? Others have already answered. I also suggest you to compile your code using the -w switch when possible. Bye, bearophile That is

Re: How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Jacob Carlborg
On 2011-05-27 07:55, Matthew Ong wrote: Hi All, The main aim here is to find out how to model similar syntax within D. Due to the nature of the architecture of the library that I have designed in Java and heavily leans towards interface generics. It works well with java. Yes. I am aware about

Re: What is the design reasons for Not considering base class overloaded

2011-05-27 Thread Matthew Ong
On 5/27/2011 2:03 PM, Matthew Ong wrote: Would not it be a better keyword such as: class A{ // assuming there is a new keyword of noinherit noinherit void foo(int x){} // all other method can be inherited in A except for this class } Ignore the last message on new noinherit, just remember we

Re: How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Matthew Ong
On 5/27/2011 2:32 PM, Jacob Carlborg wrote: On 2011-05-27 07:55, Matthew Ong wrote: In D the syntax for declaring a template and instantiate a template is not the same. Have a look at the first example of http://www.digitalmars.com/d/2.0/template.htm If don't understand after reading that

Re: How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Jonathan M Davis
On 2011-05-26 23:48, Matthew Ong wrote: On 5/27/2011 2:32 PM, Jacob Carlborg wrote: On 2011-05-27 07:55, Matthew Ong wrote: In D the syntax for declaring a template and instantiate a template is not the same. Have a look at the first example of

Re: How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Matthew Ong
On 5/27/2011 2:48 PM, Matthew Ong wrote: On 5/27/2011 2:32 PM, Jacob Carlborg wrote: On 2011-05-27 07:55, Matthew Ong wrote: Never mind, I found it. http://www.dsource.org/projects/tutorials/wiki/InterfaceTemplateExample -- Matthew Ong email: on...@yahoo.com

Re: How to use interface template? How to model interface template properly in D.

2011-05-27 Thread Matthew Ong
On 5/27/2011 2:48 PM, Matthew Ong wrote: On 5/27/2011 2:32 PM, Jacob Carlborg wrote: Thanks very much. -- Matthew Ong email: on...@yahoo.com

CP command used in the phobos windows makefile

2011-05-27 Thread Andrej Mitrovic
Guys, where did you get the unix cp port from? I don't have it installed, so I can't use make install -fwin32.mak. I've also tried using the one that comes with UnxTools from http://sourceforge.net/projects/unxutils/ , but that one fails with: cp.exe: cannot create regular file

Re: CP command used in the phobos windows makefile

2011-05-27 Thread Dmitry Olshansky
On 27.05.2011 16:06, Andrej Mitrovic wrote: Guys, where did you get the unix cp port from? I don't have it installed, so I can't use make install -fwin32.mak. I've also tried using the one that comes with UnxTools from http://sourceforge.net/projects/unxutils/ , but that one fails with:

Re: CP command used in the phobos windows makefile

2011-05-27 Thread Andrej Mitrovic
You know it'd be great if I could synchronize git with a build system. I mean if I'm switching between branches I'd like to automatically switch to a pre-compiled .lib file so I don't waste time recompiling a branch which was already compiled.

Re: CP command used in the phobos windows makefile

2011-05-27 Thread Johannes Totz
On 27/05/2011 13:06, Andrej Mitrovic wrote: Guys, where did you get the unix cp port from? I don't have it installed, so I can't use make install -fwin32.mak. I've also tried using the one that comes with UnxTools from http://sourceforge.net/projects/unxutils/ , but that one fails with:

newbie windows setup help

2011-05-27 Thread Robert Smith
I am attempting to compile a simple d source file using the http://learn-programming.za.net/learn_d_programming.html site as a guide to learning D programming. dmd2 is installed in D:\D\dmd. When I attempt to compile I get the following error: D:\D\programsdmd first.d object.d: Error: module

Re: newbie windows setup help

2011-05-27 Thread bearophile
Robert Smith: I am attempting to compile a simple d source file using the http://learn-programming.za.net/learn_d_programming.html site as a guide to learning D programming. dmd2 is installed in D:\D\dmd. Installing DMD on Windows is very easy: 1) Download the latest compiler, like dmd

Re: newbie windows setup help (path settings seem correct)

2011-05-27 Thread Robert Smith
Thanks for the reply. Yes, I have the path set with a batch file that opens a command window. A dmd command in this window displays the dmd usage help: DMD32 D Compiler v2.053... and a link command displays: OPTLINK (R) for Win32... What kind of build helper is available for Win32? Robert Smith

[Issue 4312] std.traits.ReturnType no longer accepts function literals

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4312 kenn...@gmail.com changed: What|Removed |Added CC||kenn...@gmail.com --- Comment #4

[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6014 --- Comment #3 from changlon chang...@gmail.com 2011-05-27 03:13:15 PDT --- I have no idea how to reduce this test case or how to trace the bug. I build the project with -g -debug, then run gdb . But the error is not in the project code . it

[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux freebsd

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6014 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added CC|

[Issue 4312] std.traits.ReturnType no longer accepts function literals

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4312 --- Comment #5 from Rob Jacques sandf...@jhu.edu 2011-05-27 06:46:29 PDT --- I'm not defining a closure. I'm defining a nested function literal. And given that the following compiles: void main() { int b; int funcliteral(int a){return

[Issue 4312] std.traits.ReturnType no longer accepts function literals

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4312 --- Comment #6 from kenn...@gmail.com 2011-05-27 07:16:28 PDT --- (In reply to comment #5) I'm not defining a closure. I'm defining a nested function literal. And given that the following compiles: void main() { int b; int

[Issue 4312] std.traits.ReturnType no longer accepts function literals

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4312 Rob Jacques sandf...@jhu.edu changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6063] New: Make cases where hiddenfuncerror would be thrown an error without -w

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6063 Summary: Make cases where hiddenfuncerror would be thrown an error without -w Product: D Version: D2 Platform: Other OS/Version: All Status: NEW

[Issue 6049] [CTFE]: Array literals of structs with invariant() are wrong

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6049 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6064] New: std.array.join is unnecessarily slow for strings

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6064 Summary: std.array.join is unnecessarily slow for strings Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: performance Severity: normal

[Issue 5511] std.regex optional capture with no-match cause error

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5511 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added CC|

[Issue 5805] std.regex match captures property horribly broken

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5805 Dmitry Olshansky dmitry.o...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 6065] New: [toir.c] Problem caused by std.functional.not

2011-05-27 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6065 Summary: [toir.c] Problem caused by std.functional.not Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity:

  1   2   >