On Wednesday, 9 September 2015 at 08:24:06 UTC, Kagamin wrote:
As I understand, you wanted to build an AST tree and format it
to string?
Thanks again. So I can build an AST and convert it to full D
source from that? I think that's what i'm likely going need to do.
On Tuesday, 8 September 2015 at 21:51:03 UTC, wobbles wrote:
"Previously undefined". As far as I know, this is impossible in
D. Thr compiler has to know how much memory to allocate/request
and it has to know that at compiletime (else it wouldn't be the
compiler!)
On Wednesday, 9 September 2015 at 09:14:30 UTC, Atila Neves wrote:
So, if your use-case depends on information from the
file-system, user interaction, networking, etc. then your only
choice is to generate text files with D code and compile it.
If, on the other hand, it's all defined by the
On Tuesday, 8 September 2015 at 21:51:03 UTC, wobbles wrote:
"Previously undefined". As far as I know, this is impossible in
D. Thr compiler has to know how much memory to allocate/request
and it has to know that at compiletime (else it wouldn't be the
compiler!)
There was also this:
On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote:
You have Object.factory for this. You can also use a custom
factory based on string comparison. (with some: static
if(condition) return new This; else static if(otherCondition)
return new That; etc).
I just had a look at
On Monday, 7 September 2015 at 07:57:07 UTC, Kagamin wrote:
On Sunday, 6 September 2015 at 15:15:03 UTC, chris stevens
wrote:
I guess you're right it wouldn't be too difficult to do it all
using strings. The code generation I'd done before in c# I'd
used some 3rd person library where you build
Hi All,
I am considering using D for my latest project and there are a
few features I would like and am not entirely sure at this point
whether D has them. They are:
- dynamic creation of classes/structs at runtime (think I can
emulate this with variants/dynamic)
- dynamic compilation of
On Sunday, 6 September 2015 at 14:36:53 UTC, chris stevens wrote:
- dynamic compilation of code files at runtime
I guess I could just invoke the compiler from my code for this? I
would also like to be able to load this compiled code into the
current process. This probably can be achieved
Thanks so much for your reply.
On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote:
if you mean to generate code as string, writing them to a file,
of course it will work in D.
I guess you're right it wouldn't be too difficult to do it all
using strings. The code generation I'd done