Re: how to implement a function in a different D source file

2019-11-30 Thread Omar via Digitalmars-d-learn
ok, thanks for the replies everyone ! I think i might try fiddling around with mixins and see how i like that.

Re: how to implement a function in a different D source file

2019-11-27 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 27 November 2019 at 23:32:34 UTC, Omar wrote: this forks into a second question but I think still fits this thread as it could just be seen as another form of the same question. Is there a way to define some functions in the body of a class definition, and define others outside

Re: how to implement a function in a different D source file

2019-11-27 Thread Omar via Digitalmars-d-learn
Oh I see, it seems like the answers I'm getting imply that you have the option of a pure interface or pure implementation but not a mix. I see how I could elaborate more on what I was asking about. As long as you only import the file but not try to compile the same module twice right ? So

Re: how to implement a function in a different D source file

2019-11-25 Thread Elronnd via Digitalmars-d-learn
On Tuesday, 26 November 2019 at 03:06:52 UTC, Omar wrote: the page here https://dlang.org/spec/function.html suggests you can implement a function in a different file, and a different tutorial somewhere else mentioned the endeavour of no-bodied-functions as a way of presenting a black-box type

Re: how to implement a function in a different D source file

2019-11-25 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 26 November 2019 at 03:55:24 UTC, mipri wrote: On Tuesday, 26 November 2019 at 03:06:52 UTC, Omar wrote: the page here https://dlang.org/spec/function.html suggests you can implement a function in a different file ... mentioned the endeavour of no-bodied-functions as a way of

Re: how to implement a function in a different D source file

2019-11-25 Thread mipri via Digitalmars-d-learn
On Tuesday, 26 November 2019 at 03:06:52 UTC, Omar wrote: the page here https://dlang.org/spec/function.html suggests you can implement a function in a different file ... mentioned the endeavour of no-bodied-functions as a way of presenting a black-box type of interface. oh, that's what you

Re: how to implement a function in a different D source file

2019-11-25 Thread mipri via Digitalmars-d-learn
On Tuesday, 26 November 2019 at 03:06:52 UTC, Omar wrote: Hey, I'm very interested in this programming language, I already prefer it to C++ and if only i had adopted it years ago, but that's beside the point. I read a bunch of tuts today and the only thing I'm really stuck on at the moment

how to implement a function in a different D source file

2019-11-25 Thread Omar via Digitalmars-d-learn
Hey, I'm very interested in this programming language, I already prefer it to C++ and if only i had adopted it years ago, but that's beside the point. I read a bunch of tuts today and the only thing I'm really stuck on at the moment is how to actually implement a function in a different