[Issue 23390] value of void initialized variable is unspecified (and not subject to implementation defined behavior)

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23390 Iain Buclaw changed: What|Removed |Added Priority|P1 |P3 --

[Issue 23390] value of void initialized variable is unspecified (and not subject to implementation defined behavior)

2022-10-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23390 --- Comment #3 from kdevel --- (In reply to kdevel from comment #2) > As far as I recall the terminology for unknown but valid values is > "unspecified value". Hence this issue. Please delete the "but valid". My last paragraph should read: As

[Issue 23390] value of void initialized variable is unspecified (and not subject to implementation defined behavior)

2022-10-06 Thread d-bugmail--- via Digitalmars-d-bugs
it's set. This change would forbid that, and I don't see any > benefit to doing so. Sorry for the "UB" in the subject. The documentation says that the value of a void initialized variable is "implementation defined". I corrected the subject. "implementation defined" m

[Issue 23390] value of void initialized variable is unspecified (and not subject to implementation defined behavior)

2022-10-06 Thread d-bugmail--- via Digitalmars-d-bugs
|variable is unspecified |variable is unspecified |(and not subject to UB) |(and not subject to ||implementation defined ||behavior) --

[Issue 23390] value of void initialized variable is unspecified (and not subject to UB)

2022-10-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23390 elpenguin...@gmail.com changed: What|Removed |Added CC||elpenguin...@gmail.com --- Comment

[Issue 23390] New: value of void initialized variable is unspecified (and not subject to UB)

2022-10-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23390 Issue ID: 23390 Summary: value of void initialized variable is unspecified (and not subject to UB) Product: D Version: D2 Hardware: All OS: All

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-17 Thread Jacob Carlborg via Digitalmars-d
On 2018-01-17 09:41, Binghoo Dang wrote: at least, the project is not active now Not sure what you're talking about. The "master" branch was updated 10 days ago [1] and the "dub2 branch two days ago [2]. , you can just try to build it, you will found what I'm saying. It built 10 days ago

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-17 Thread Binghoo Dang via Digitalmars-d
On Tuesday, 16 January 2018 at 12:24:10 UTC, Jacob Carlborg wrote: On 2018-01-16 09:56, Binghoo Dang wrote: hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ? The project is not dead, but the forum

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-16 Thread Basile B. via Digitalmars-d
On Tuesday, 16 January 2018 at 12:11:30 UTC, Guillaume Piolat wrote: On Tuesday, 16 January 2018 at 08:56:50 UTC, Binghoo Dang wrote: hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ? Or maybe

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-16 Thread Steven Schveighoffer via Digitalmars-d
On 1/16/18 7:24 AM, Jacob Carlborg wrote: On 2018-01-16 09:56, Binghoo Dang wrote: hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ? The project is not dead, but the forum doesn't get that much activity

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-16 Thread Jacob Carlborg via Digitalmars-d
On 2018-01-16 09:56, Binghoo Dang wrote: hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ? The project is not dead, but the forum doesn't get that much activity. -- /Jacob Carlborg

Re: Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-16 Thread Guillaume Piolat via Digitalmars-d
On Tuesday, 16 January 2018 at 08:56:50 UTC, Binghoo Dang wrote: hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ? Or maybe "Ecosystem" since there is no single place to speak about

Can the forums has a subject for GUI rather than a deading project DWT ?

2018-01-16 Thread Binghoo Dang via Digitalmars-d
hi there, the subject under Ecosystem on this forums exist an `DWT`, which is now just seams dying , can you guy just remove DWT to GUI ?

Re: On the subject of error messages

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 2:29 PM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 15:47:37 UTC, Steven Schveighoffer wrote: On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When I have a type like this: struct S { int foo; } and the

Re: On the subject of error messages

2017-05-16 Thread Stanislav Blinov via Digitalmars-d
On Tuesday, 16 May 2017 at 15:47:37 UTC, Steven Schveighoffer wrote: On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When we have tests using dummy lambdas, are we to expect users to immediately extract the lambda body, parse

Re: On the subject of error messages

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When we have tests using dummy lambdas, are we to expect users to immediately extract the lambda body, parse it, and figure out what's wrong? This is what you have to do today.

Re: On the subject of error messages

2017-05-16 Thread Stanislav Blinov via Digitalmars-d
On Tuesday, 16 May 2017 at 14:00:51 UTC, Nick Treleaven wrote: On Tuesday, 16 May 2017 at 11:20:57 UTC, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 09:04:32 UTC, Nick Treleaven wrote: The problem with this approach is all the work required to convert existing code to use this style.

Re: On the subject of error messages

2017-05-16 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 16 May 2017 at 11:20:57 UTC, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 09:04:32 UTC, Nick Treleaven wrote: The problem with this approach is all the work required to convert existing code to use this style. ... That's not a problem. In cases where compiler-provided

Re: On the subject of error messages

2017-05-16 Thread Stanislav Blinov via Digitalmars-d
On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When we have tests using dummy lambdas, are we to expect users to immediately extract the lambda body, parse it, and figure out what's wrong? This is what you have to do today. The task has already been tried by the

Re: On the subject of error messages

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/15/17 8:14 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 20:55:35 UTC, Steven Schveighoffer wrote: On 5/15/17 4:24 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 19:44:11 UTC, Steven Schveighoffer wrote: It has to know. It has to evaluate the boolean to see if it should

Re: On the subject of error messages

2017-05-16 Thread Stanislav Blinov via Digitalmars-d
On Tuesday, 16 May 2017 at 09:04:32 UTC, Nick Treleaven wrote: ... foreach(i, T; types!args) { typeof(args) ;-) Thanks :) static if (is(T == string)) { pragma(msg, format!"Argument %d is a string, which is not supported" (i+1)); The problem

Re: On the subject of error messages

2017-05-16 Thread Nick Treleaven via Digitalmars-d
On Saturday, 13 May 2017 at 14:41:50 UTC, Stanislav Blinov wrote: template types(args...) { static if (args.length) alias types = AliasSeq!(typeof(args[0]), types!(args[1..$])); else alias types = AliasSeq!(); } ... foreach(i, T; types!args) { typeof(args) ;-)

Re: On the subject of error messages

2017-05-15 Thread MysticZach via Digitalmars-d
On Saturday, 13 May 2017 at 14:41:50 UTC, Stanislav Blinov wrote: file(line): Error: template foo cannot deduce function from argument types !()(int, string), candidates are: file(line): foo(Args...)(auto ref Args arg) if (!anySatisfy!(isString, Args)) Ya know, even a simple new line before

Re: On the subject of error messages

2017-05-15 Thread Stanislav Blinov via Digitalmars-d
On Monday, 15 May 2017 at 20:55:35 UTC, Steven Schveighoffer wrote: On 5/15/17 4:24 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 19:44:11 UTC, Steven Schveighoffer wrote: It has to know. It has to evaluate the boolean to see if it should compile! The current situation would be like

Re: On the subject of error messages

2017-05-15 Thread Steven Schveighoffer via Digitalmars-d
On 5/15/17 4:24 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 19:44:11 UTC, Steven Schveighoffer wrote: It has to know. It has to evaluate the boolean to see if it should compile! The current situation would be like the compiler saying there's an error in your code, but won't tell you

Re: On the subject of error messages

2017-05-15 Thread Stanislav Blinov via Digitalmars-d
On Monday, 15 May 2017 at 19:44:11 UTC, Steven Schveighoffer wrote: On 5/15/17 1:16 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 15:30:38 UTC, Steven Schveighoffer wrote: Argument 2 is a string, which is not supported file(line): Error: template foo cannot deduce function from

Re: On the subject of error messages

2017-05-15 Thread Steven Schveighoffer via Digitalmars-d
On 5/15/17 1:16 PM, Stanislav Blinov wrote: On Monday, 15 May 2017 at 15:30:38 UTC, Steven Schveighoffer wrote: Argument 2 is a string, which is not supported file(line): Error: template foo cannot deduce function from argument types !()(int, string), candidates are: file(line):

Re: On the subject of error messages

2017-05-15 Thread Stanislav Blinov via Digitalmars-d
On Monday, 15 May 2017 at 15:30:38 UTC, Steven Schveighoffer wrote: Imagine also a constraint like isInputRange!R. This basically attempts to compile a dummy lambda. How would one handle this in user-code? Let's look at something more practical than my initial example, even if less

Re: On the subject of error messages

2017-05-15 Thread Stanislav Blinov via Digitalmars-d
On Monday, 15 May 2017 at 15:30:38 UTC, Steven Schveighoffer wrote: Argument 2 is a string, which is not supported file(line): Error: template foo cannot deduce function from argument types !()(int, string), candidates are: file(line): foo(Args...)(auto ref Args arg) if (noStringArgs!args)

Re: On the subject of error messages

2017-05-15 Thread Steven Schveighoffer via Digitalmars-d
On 5/13/17 10:41 AM, Stanislav Blinov wrote: Let's suppose I wrote the following template function: import std.meta; enum bool isString(T) = is(T == string); void foo(Args...)(auto ref Args args) if (!anySatisfy!(isString, Args)) { // ... } This one is variadic, but it could as well

Re: On the subject of error messages

2017-05-15 Thread Stanislav Blinov via Digitalmars-d
Nobody read that or is it just *that* bad? :)

On the subject of error messages

2017-05-13 Thread Stanislav Blinov via Digitalmars-d
Let's suppose I wrote the following template function: import std.meta; enum bool isString(T) = is(T == string); void foo(Args...)(auto ref Args args) if (!anySatisfy!(isString, Args)) { // ... } This one is variadic, but it could as well have been non-variadic. The important aspect is

Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread Jordan Wilson via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:49:39 UTC, crimaniak wrote: On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double) Learn something new everyday, thanks :-)

Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread crimaniak via Digitalmars-d-learn
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double)

Re: code D'ish enough? - ignore previous post with same subject

2017-02-27 Thread Thorstein via Digitalmars-d-learn
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: auto readNumMatCsv2 (string filePath, string ndv, string new_ndv){ double[][] p_numArray; try { auto lines = File(filePath,"r").byLine; lines.popFront; // get read of header p_numArray =

Re: code D'ish enough? - ignore previous post with same subject

2017-02-27 Thread Thorstein via Digitalmars-d-learn
I really appriciate your comments and thoughts! On Sunday, 26 February 2017 at 21:02:52 UTC, ag0aep6g wrote: On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote: * "no-data-value"? No-data-values in data sets are common at least in geosciences: raster images, spatial simulation

Re: code D'ish enough? - ignore previous post with same subject

2017-02-26 Thread ag0aep6g via Digitalmars-d-learn
On Sunday, 26 February 2017 at 19:34:33 UTC, thorstein wrote: // Reads CSV-like files with only numeric values in each column // new_ndv replaces ndv, which is the original no-data-value double[][]* readNumMatCsv(char[] filePath, int numHeaderLines, char[] ndv, char[] new_ndv) *

code D'ish enough? - ignore previous post with same subject

2017-02-26 Thread thorstein via Digitalmars-d-learn
Hi, sorry for posting again, but I used a keyboard combination that accidently send my post before it was done. Coming more or less from Python I just started with D. Not a real programmer, just automating things and looking for a neat compiled language. Just to learn, I wrote a function

[no subject]

2014-04-14 Thread Brad Roberts via Digitalmars-d
---BeginMessage--- Another flurry of bounces floated through today (which I handled by removing the suspensions, again). The only practical choice is a fairly intrusive one. I've enabled the from_is_list option, meaning that the 'from' address from mail originating through the list will be

[no subject]

2014-04-14 Thread Brad Roberts via Digitalmars-d
---BeginMessage--- Another flurry of bounces floated through today (which I handled by removing the suspensions, again). The only practical choice is a fairly intrusive one. I've enabled the from_is_list option, meaning that the 'from' address from mail originating through the list will be

Re: Enums - probably an old subject

2013-11-22 Thread Steve Teale
Does it make sense? I should be really in D.learn but asked that here in context ;) Sounds like most of us should be in D Learn on this topic. I should find the time to write up a case for Andrei's suggestion. I have no problem with the compiler telling me that my code is ambiguous, in

Re: Enums - probably an old subject

2013-11-21 Thread Michal Minich
On Thursday, 21 November 2013 at 07:42:48 UTC, Craig Dillabaugh wrote: I should also mention, this post likely better belongs in: digitalmars.D.learn I don't entirely think so. I think the OP is arguing that D should be able to identify symbol as specific enum's field when used: - in

Re: Enums - probably an old subject

2013-11-21 Thread Daniel Kozak
On Thursday, 21 November 2013 at 07:22:39 UTC, Steve Teale wrote: import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == EVIL) writeln(Road to hell); } void main() { foo(EVIL); } Why does the compiler complain in both

Re: Enums - probably an old subject

2013-11-21 Thread Craig Dillabaugh
On Thursday, 21 November 2013 at 08:05:03 UTC, Michal Minich wrote: On Thursday, 21 November 2013 at 07:42:48 UTC, Craig Dillabaugh wrote: I should also mention, this post likely better belongs in: digitalmars.D.learn I don't entirely think so. I think the OP is arguing that D should be

Re: Enums - probably an old subject

2013-11-21 Thread Steve Teale
On Thursday, 21 November 2013 at 17:39:28 UTC, Andrei Alexandrescu wrote: On 11/21/13 8:48 AM, Steve Teale wrote: Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some things like this, are there other examples? Guess it could.

Re: Enums - probably an old subject

2013-11-21 Thread Meta
On Thursday, 21 November 2013 at 16:48:59 UTC, Steve Teale wrote: Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some things like this, are there other examples? Is this what you mean? enum Intention { EVIL,

Re: Enums - probably an old subject

2013-11-21 Thread Andrei Alexandrescu
On 11/21/13 8:48 AM, Steve Teale wrote: Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some things like this, are there other examples? Guess it could. One other thing we could do is to make enum namespaces behave like imports.

Re: Enums - probably an old subject

2013-11-21 Thread Steve Teale
On Thursday, 21 November 2013 at 08:37:32 UTC, Craig Dillabaugh wrote: Yes, perhaps that was his intention (no pun intended). First few times I used enums in D I was caught because I expected the behavior he is suggesting here would work. Pun was intended ;=)

Re: Enums - probably an old subject

2013-11-21 Thread monarch_dodra
On Thursday, 21 November 2013 at 18:44:39 UTC, Steve Teale wrote: On Thursday, 21 November 2013 at 17:39:28 UTC, Andrei Alexandrescu wrote: On 11/21/13 8:48 AM, Steve Teale wrote: Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some

Re: Enums - probably an old subject

2013-11-21 Thread John J
On 11/21/2013 02:20 PM, monarch_dodra wrote: When you import from a module, you only need to specify the module name if there is ambiguity. So for example: // import std.array; void main() { split(hello); //OK! } // import std.array; import std.algorithm; void main() {

Re: Enums - probably an old subject

2013-11-21 Thread Steve Teale
BOOM! Code no longer compiles. As a rule, the code that compiles and works should preserve its behavior when new code is added, so this is prohibited. Also please post to D.learn forgot to add: void foo(OtherIntention rth) { ... } Which of the two is being called by main? I thought

Re: Enums - probably an old subject

2013-11-21 Thread John J
On 11/21/2013 02:20 PM, monarch_dodra wrote: When you import from a module, you only need to specify the module name if there is ambiguity. So for example: // import std.array; void main() { split(hello); //OK! } // import std.array; import std.algorithm; void main() {

Re: Enums - probably an old subject

2013-11-21 Thread Brad Anderson
On Thursday, 21 November 2013 at 17:39:28 UTC, Andrei Alexandrescu wrote: On 11/21/13 8:48 AM, Steve Teale wrote: Could 'with' be extended to cover enum names do you think? Also a supplementary question - does auto lock out some things like this, are there other examples? Guess it could.

Re: Enums - probably an old subject

2013-11-21 Thread Steve Teale
That should be: if( rth == Intention.EVIL ) and foo( Intention.EVIL ); Phobos is less picky than the compiler. Try this: import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == Intention.EVIL) writefln(The road to hell is

Re: Enums - probably an old subject

2013-11-21 Thread John J
On 11/21/2013 01:36 PM, Steve Teale wrote: I thought that compilers were supposed to help you if you did ambiguous things. An interesting example is: int bar(int n) { return n+1; } int bar(int n) { return n+2; } void main() { int v = 22; int n = bar(22); } Compiler helps

Re: Enums - probably an old subject

2013-11-21 Thread inout
On Thursday, 21 November 2013 at 17:19:18 UTC, inout wrote: On Thursday, 21 November 2013 at 07:22:39 UTC, Steve Teale wrote: import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == EVIL) writeln(Road to hell); } void main() {

Re: Enums - probably an old subject

2013-11-21 Thread inout
On Thursday, 21 November 2013 at 07:22:39 UTC, Steve Teale wrote: import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == EVIL) writeln(Road to hell); } void main() { foo(EVIL); } Why does the compiler complain in both

Re: Enums - probably an old subject

2013-11-21 Thread Steve Teale
On Thursday, 21 November 2013 at 08:05:03 UTC, Michal Minich wrote: On Thursday, 21 November 2013 at 07:42:48 UTC, Craig Dillabaugh wrote: I should also mention, this post likely better belongs in: digitalmars.D.learn I don't entirely think so. I think the OP is arguing that D should be

Re: Enums - probably an old subject

2013-11-21 Thread monarch_dodra
On Friday, 22 November 2013 at 00:50:25 UTC, John J wrote: On 11/21/2013 02:20 PM, monarch_dodra wrote: When you import from a module, you only need to specify the module name if there is ambiguity. So for example: // import std.array; void main() { split(hello); //OK! } //

Enums - probably an old subject

2013-11-20 Thread Steve Teale
import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == EVIL) writeln(Road to hell); } void main() { foo(EVIL); } Why does the compiler complain in both places about EVIL. Can it not work out which EVIL I mean? There's

Re: Enums - probably an old subject

2013-11-20 Thread Craig Dillabaugh
On Thursday, 21 November 2013 at 07:22:39 UTC, Steve Teale wrote: import std.stdio; enum Intention { EVIL, NEUTRAL, GOOD, SAINTLY } void foo(Intention rth) { if (rth == EVIL) writeln(Road to hell); } void main() { foo(EVIL); } Why does the compiler complain in both

Re: Enums - probably an old subject

2013-11-20 Thread Craig Dillabaugh
On Thursday, 21 November 2013 at 07:28:14 UTC, Craig Dillabaugh wrote: On Thursday, 21 November 2013 at 07:22:39 UTC, Steve Teale wrote: clip Why does the compiler complain in both places about EVIL. Can it not work out which EVIL I mean? There's only one choice. That should be: if( rth

no subject

2013-05-11 Thread skeptical
Deep and darkness slumber, endless sleep... nothing moves inside my funeral suite. I feel the sun slip down, as hunger strikes, waking like being born here comes the night! All my senses awakened, by little demons, taste the human heartbeat... bittersweet. (bittersweet)

[no subject]

2013-04-18 Thread Manu
Can anyone explain this restriction to me? Trying to extern to a C++ class. // mirror the C++ vtable extern (C++) interface IVirtuals { void virtualMethod(); } // create a struct to pose as the C++ class struct Test { // make the virtuals accessible with 'static this' @property IVirtuals

Re: On the subject of properties, and possibility of having them in the library

2013-01-27 Thread Timon Gehr
On 01/27/2013 12:23 AM, Simen Kjaeraas wrote: On 2013-23-26 20:01, Timon Gehr timon.g...@gmx.ch wrote: On 01/26/2013 03:41 PM, Simen Kjaeraas wrote: While the storm raged, I decided to try implementing properties as library types. I encountered a few obstacles, which I will outline here.

Re: On the subject of properties, and possibility of having them in the library

2013-01-27 Thread Simen Kjaeraas
On 2013-49-27 09:01, Timon Gehr timon.g...@gmx.ch wrote: On 01/27/2013 12:23 AM, Simen Kjaeraas wrote: On 2013-23-26 20:01, Timon Gehr timon.g...@gmx.ch wrote: On 01/26/2013 03:41 PM, Simen Kjaeraas wrote: While the storm raged, I decided to try implementing properties as library types. I

On the subject of properties, and possibility of having them in the library

2013-01-26 Thread Simen Kjaeraas
While the storm raged, I decided to try implementing properties as library types. I encountered a few obstacles, which I will outline here. First, my intended syntax: class A { int _n; Property!( () = _n, value = _n = value ) n; } Property would then be a struct,

Re: On the subject of properties, and possibility of having them in the library

2013-01-26 Thread mist
Reason why library properties are not that usable is simple: typeof(A._n) must be same as typeof(A.n) or this is not really a property. Please take a look at examples and arguments in wiki: http://wiki.dlang.org/Property_Discussion_Wrap-up

Re: On the subject of properties, and possibility of having them in the library

2013-01-26 Thread Maxim Fomin
On Saturday, 26 January 2013 at 14:41:43 UTC, Simen Kjaeraas wrote: Now, the obstacle here is I can't refer to _n in those lambdas. Why not? I'm guessing the struct has no context member, and the lambdas don't because the class is not yet instantiated. Could this be fixed? I think so, and I

Re: On the subject of properties, and possibility of having them in the library

2013-01-26 Thread Timon Gehr
On 01/26/2013 03:41 PM, Simen Kjaeraas wrote: While the storm raged, I decided to try implementing properties as library types. I encountered a few obstacles, which I will outline here. First, my intended syntax: class A { int _n; mixin Property!( () = _n, value

Re: On the subject of properties, and possibility of having them in the library

2013-01-26 Thread Simen Kjaeraas
On 2013-23-26 20:01, Timon Gehr timon.g...@gmx.ch wrote: On 01/26/2013 03:41 PM, Simen Kjaeraas wrote: While the storm raged, I decided to try implementing properties as library types. I encountered a few obstacles, which I will outline here. First, my intended syntax: class A { int

[META] Amending subject names in long discussions

2010-08-19 Thread Graham Fawcett
Hi folks, I just wanted to share a minor pet peeve I have with the list (and with Usenet in general). There's a bad habit here of taking discussions off on (worthwhile) tangents, but not amending the Subject line to reflect the new topic. For example, there's an enormous discussion on Andrei's

Re: [META] Amending subject names in long discussions

2010-08-19 Thread Nick Sabalausky
the Subject line to reflect the new topic. For example, there's an enormous discussion on Andrei's Google Talk which is really about DDoc and Doxygen. It has totally left the Google Talk building, and deserves a revised subject. The Subject line is our friend, use it well! :) Good point, I'll try

Re: (no subject)

2010-06-06 Thread Robert Clipsham
On 06/06/10 13:40, new to d wrote: After reading on this newsgroup about the use of D with cgi i've tried it on my host. Even a simple hello world program gives me internal server error while equivalent c program compiled with gcc works fine. Does any one here have any idea what the problem

Re: (no subject)

2010-06-06 Thread new to d
Robert Clipsham Wrote: On 06/06/10 14:00, new to d wrote: It's a typical hello world program: import std.stdio; void main(string[] args) { writeln(Hello world!); } I also tried using printf instead of writeln. I'm compiling it with dmd test.d. I'm using dmd v2.046. I'm compiling

Re: (no subject)

2010-06-06 Thread new to d
new to d Wrote: Robert Clipsham Wrote: On 06/06/10 14:00, new to d wrote: It's a typical hello world program: import std.stdio; void main(string[] args) { writeln(Hello world!); } I also tried using printf instead of writeln. I'm compiling it with dmd test.d. I'm

Re: (no subject)

2010-06-06 Thread Ali Çehreli
Michal Minich wrote: On Sun, 06 Jun 2010 09:00:25 -0400, new to d wrote: import std.stdio; void main(string[] args) { writeln(Hello world!); } Just a guess, but maybe the difference of your C and D programs is in return value, which can be differently interpreted by CGI host. try

Re: Off subject

2009-01-07 Thread Vincent Richomme
Jussi Jumppanen a écrit : Vincent Richomme Wrote: I would like to know if there are some parsers/scripts that could parse some C/C++ language and that could insert printf in each function. One option would be to use a regular expression within a search and replace. Just as a simple test I

Re: Off subject

2009-01-06 Thread Ary Borenszweig
Vincent Richomme wrote: Hi, sorry to ask my question here but since people are motivated by new language, source code, ... I thought it was a good place to ask my question about source code analysis. I would like to know if there are some parsers/scripts that could parse some C/C++ language