Re: property functions

2021-05-17 Thread Nick via Digitalmars-d-learn
On Sunday, 16 May 2021 at 15:47:55 UTC, Adam D. Ruppe wrote: On Sunday, 16 May 2021 at 15:12:25 UTC, Nick wrote: Is this warning still valid? The @property thing doesn't do much. All it does is change typeof(a.prop) from function over to the return value of the function. (Which actually make

property functions

2021-05-16 Thread Nick via Digitalmars-d-learn
The [Property Functions](https://dlang.org/spec/function.html#property-functions) documentation reads: WARNING: The definition and usefulness of property functions is being reviewed, and the implementation is currently incomplete. Using property functions is not recommended until the definiti

Re: class grammar

2021-05-07 Thread Nick via Digitalmars-d-learn
On Friday, 7 May 2021 at 19:33:30 UTC, Basile B. wrote: On Friday, 7 May 2021 at 18:07:45 UTC, Nick wrote: The class grammar, as defined in the D language specification ... is not clear to me how a user-defined type (such as a class or interface) is also a 'BasicType' (as defined by the grammar

class grammar

2021-05-07 Thread Nick via Digitalmars-d-learn
The class grammar, as defined in the D language specification ([Classes](https://dlang.org/spec/grammar.html#classes)), seems to imply that a class can inherit from a fundamental type. Explicitly, the specification says that a 'SuperClass' is a 'BasicType'. And a 'FundamentalType' is a 'BasicTy

Re: D to C++

2016-08-31 Thread Nick via Digitalmars-d-learn
On Tuesday, 30 August 2016 at 14:24:22 UTC, eugene wrote: On Tuesday, 30 August 2016 at 13:33:44 UTC, Nick wrote: Is it possible to compile from D to C++? Explanation: I do some competition programming and would like to write it in D instead of C++ :) maybe will help https://wiki.dlang.org/C

D to C++

2016-08-30 Thread Nick via Digitalmars-d-learn
Is it possible to compile from D to C++? Explanation: I do some competition programming and would like to write it in D instead of C++ :)

Re: Running task once a day in vibe.d

2016-02-17 Thread Nick via Digitalmars-d-learn
Thank you very much, this was exactly what I was looking for!

Running task once a day in vibe.d

2016-02-16 Thread Nick via Digitalmars-d-learn
Hey folks I'm making a vibe.d application. Once a day it needs to download some data. How do i get the program to perform this task once a day? Regards, Nick

Re: Shouldn't the pointers be different

2015-01-07 Thread Nick via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 10:56:07 UTC, bearophile wrote: Nick: The two nodes have the same address, is this right? What you are printing is the address of the reference in the stack frame of add(). If you want to print the reference you can use this: import std.stdio; class Test(

Shouldn't the pointers be different

2015-01-07 Thread Nick via Digitalmars-d-learn
When i try to run the following code import std.stdio; void main(){ auto a= new test!int(); a.add(0); a.add(1); } class test(T){ void add(T e){ auto temp= new node(); writeln("new node", &temp); } class node{