digitalmars.D - export keyword
- seany (19/19) Jun 24 2014 Hello,
- seany (21/21) Jun 24 2014 Also, while we are at it,
- bearophile (6/21) Jun 24 2014 This is not possible, and I see no plans in supporting that. You
- seany (1/1) Jun 24 2014 Thnak you, and what about the Export keywords?
- dennis luehring (8/23) Jun 24 2014 would not make sense at all
- rumbu (8/19) Jun 24 2014 class C2(T)
- Kagamin (2/4) Jun 24 2014 It declares symbols from dynamic library.
Hello, I am considering the follwoing: I have a wide range of input filess formatted in various ways (meteorological data, bathymetry data, geojson, rss warning about meteorological events and so on). While I understand that perl is the preffered language for processing formatted documents, I wrote a D program, which can, up to the completeness of my knowledge of formatting schemes, dig through the input files. Now, the D program digs through all these raw input files, converts them to a standard format (similar to JSON, i tailored it for my own needs a bit), and then writes them to files, that I access with openFoam. I recon, that D has the keyword "export", with which symbols can be accessed accross different applications. But, I dont get much info on it. I could, for example write a D gateway to openFoam - and channel the output of the first D program to the later via export. could anyone give me more information on this? Thank you
Jun 24 2014
Also, while we are at it, does d support declarations like: class C { public : int a; string b; double c; } etc? If not, could this be implemented in a future version? i.e. are there ideas to do so? that would have been nice. and could I as well write class C2{ auto x this(T)(T y) { this.x = y; } } This would help me, for example, to use a single definition, to cover, e.g. int and double, and not write them twice - as in usual overload...
Jun 24 2014
seany:does d support declarations like: class C { public : int a; string b; double c; }Yes, that's possible.and could I as well write class C2{ auto x this(T)(T y) { this.x = y; } }This is not possible, and I see no plans in supporting that. You have to use some workaround, like a helper function... Bye, bearophile
Jun 24 2014
Am 24.06.2014 11:34, schrieb seany:> Also, while we are at it,does d support declarations like: class C { public : int a; string b; double c; }read the manual first http://dlang.org/classand could I as well write class C2{ auto x this(T)(T y) { this.x = y; } }would not make sense at all you would then also need methods that can auto-magicaly work with your x - that ist not (clean) be possible maybe a template+interface could help - but it seems that your implementation ideas are a little strange - give an example of what you try to reach
Jun 24 2014
On Tuesday, 24 June 2014 at 09:34:44 UTC, seany wrote:and could I as well write class C2{ auto x this(T)(T y) { this.x = y; } } This would help me, for example, to use a single definition, to cover, e.g. int and double, and not write them twice - as in usual overload...class C2(T) { T x; this(T y) { this.x = y } } Eventually C2!T can inherit an abstract class C1 with basic functionality or an interface.
Jun 24 2014
On Tuesday, 24 June 2014 at 09:31:08 UTC, seany wrote:I recon, that D has the keyword "export", with which symbols can be accessed accross different applications.It declares symbols from dynamic library.
Jun 24 2014