Re: getters and setters not an lvalue

2012-11-01 Thread Jacob Carlborg
On 2012-10-31 23:48, Adam D. Ruppe wrote: I tried it and found getting almost there is easy... but getting it to work in a bunch of edge cases is incredibly difficult. I can imagine operator overloading, opDispatch and similar features making it a lot harder. -- /Jacob Carlborg

Re: About demangling

2012-11-01 Thread Dan
On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: On 11-10-2012 22:56, Sean Kelly wrote: On Oct 11, 2012, at 6:17 AM, Lubos Pintes lubos.pin...@gmail.com wrote: Hi, Can someone point me to some source with information about name demangling when compiling some D

Re: About demangling

2012-11-01 Thread H. S. Teoh
On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: On 11-10-2012 22:56, Sean Kelly wrote: On Oct 11, 2012, at 6:17 AM, Lubos Pintes lubos.pin...@gmail.com wrote: Hi, Can someone point me to some source with

Re: About demangling

2012-11-01 Thread Regan Heath
On Thu, 01 Nov 2012 15:40:23 -, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: On 11-10-2012 22:56, Sean Kelly wrote: On Oct 11, 2012, at 6:17 AM, Lubos Pintes

Re: About demangling

2012-11-01 Thread Regan Heath
On Thu, 01 Nov 2012 15:40:23 -, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: On 11-10-2012 22:56, Sean Kelly wrote: On Oct 11, 2012, at 6:17 AM, Lubos Pintes

Re: About demangling

2012-11-01 Thread H. S. Teoh
On Thu, Nov 01, 2012 at 04:25:56PM -, Regan Heath wrote: On Thu, 01 Nov 2012 15:40:23 -, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: On 11-10-2012 22:56, Sean

Re: About demangling

2012-11-01 Thread Regan Heath
On Thu, 01 Nov 2012 16:25:56 -, Regan Heath re...@netmail.co.nz wrote: Adding writefln to demangle.d to debug the issue shows that args[1] is - and that getopt is throwing the exception invalid UTF-8 sequence. I was wrong here, this line is the issue: stderr.writeln(e.msg); For some

Re: About demangling

2012-11-01 Thread Regan Heath
On Thu, 01 Nov 2012 17:21:29 -, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Nov 01, 2012 at 04:25:56PM -, Regan Heath wrote: On Thu, 01 Nov 2012 15:40:23 -, H. S. Teoh hst...@quickfur.ath.cx wrote: On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October

Re: About demangling

2012-11-01 Thread H. S. Teoh
On Thu, Nov 01, 2012 at 08:40:23AM -0700, H. S. Teoh wrote: On Thu, Nov 01, 2012 at 03:16:25PM +0100, Dan wrote: On Thursday, 11 October 2012 at 21:04:28 UTC, Alex Rønne Petersen wrote: [...] We even have a tool for that:

struct Yes in std.typecons

2012-11-01 Thread Peter Summerland
The docs say: Convenience names that allow using e.g. yes!encryption instead of Flag!encryption.yes and no!encryption instead of Flag!encryption.no. I could not get yes!encription to work. But Yes.encription does. Are the docs out of date? Am I missing something? E.g., module yes_no_flag;

Vibe: I found the problem, but don't know how to fix it

2012-11-01 Thread Lubos Pintes
Hi, Some time ago I reported on D.Anounce, that Vibe apps are not working on my system, they failed with an exception. So I diagnosed a bit and found the following: There is a folder on my system C:\Users\pintes\AppData\Local\Temp\.rdmd\source which contains some DLLs needed for successful

Re: struct Yes in std.typecons

2012-11-01 Thread Ali Çehreli
On 11/01/2012 10:41 AM, Peter Summerland wrote: The docs say: Convenience names that allow using e.g. yes!encryption instead of Flag!encryption.yes and no!encryption instead of Flag!encryption.no. The documentation is wrong. Please either file a bug report or click the Improve this page

Re: Vibe: I found the problem, but don't know how to fix it

2012-11-01 Thread denizzzka
On Thursday, 1 November 2012 at 18:25:22 UTC, Lubos Pintes wrote: Hi, Some time ago I reported on D.Anounce, that Vibe apps are not working on my system, they failed with an exception. So I diagnosed a bit and found the following: There is a folder on my system

How to add n items to TypeTuple?

2012-11-01 Thread denizzzka
For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string );

Re: How to add n items to TypeTuple?

2012-11-01 Thread Justin Whear
On Thu, 01 Nov 2012 19:42:07 +0100, denizzzka wrote: For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string ); Use a recursive template. Here's one that

Re: How to add n items to TypeTuple?

2012-11-01 Thread Simen Kjaeraas
On 2012-11-01, 19:52, Justin Whear wrote: On Thu, 01 Nov 2012 19:42:07 +0100, denizzzka wrote: For example, adding 3 strings to type tuple t: foreach( i; 0..2 ) alias TypeTuple!( t, string ) t; // this is wrong code and result should be: TypeTuple!( string, string, string ); Use a

Re: How to add n items to TypeTuple?

2012-11-01 Thread denizzzka
Great! Thanks!

vestigial delete in language spec

2012-11-01 Thread Dan
TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. (D used to have a delete operator, but it was deprecated.) You still can free memory manually if you really, really know what you’re doing by calling the function

Re: vestigial delete in language spec

2012-11-01 Thread Alex Rønne Petersen
On 01-11-2012 22:21, Dan wrote: TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. (D used to have a delete operator, but it was deprecated.) You still can free memory manually if you really, really know what you’re doing

SList of chars not possible?

2012-11-01 Thread They call me Mr. D
auto i = SList!int(1, 2, 3, 4, 5, 6, 7); auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0); auto s = SList!string([I, Hello, World]); auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the following C:\D\dmd2\windows\bin\..\..\src\phobos\std\container.d(905): Error:

Re: vestigial delete in language spec

2012-11-01 Thread Ali Çehreli
On 11/01/2012 02:21 PM, Dan wrote: TDPL states -- However, unlike in C++, clear does not dispose of the object’s own memory and there is no delete operator. Additionally, TDPL predates 'clear's deprecation in December 2012. It is called 'destroy' now. Ali

Re: SList of chars not possible?

2012-11-01 Thread Ali Çehreli
On 11/01/2012 03:18 PM, They call me Mr. D wrote: auto i = SList!int(1, 2, 3, 4, 5, 6, 7); auto f = SList!float(1.1, 2.234, 3.21, 4.3, 5.001, 6.2, 7.0); auto s = SList!string([I, Hello, World]); auto c = SList!char('a', 'b' ,'c'); // doesn't compile, get the following

Re: vestigial delete in language spec

2012-11-01 Thread Jonathan M Davis
On Thursday, November 01, 2012 22:21:11 Dan wrote: struct S { int[] a; // array is privately owned by this instance this(this) { a = a.dup; } ~this() { delete a; } } Is the delete call, then per TDPL not necessary? Is it harmful or harmless? It's not necessary at all. delete is