On Thursday, 29 May 2014 at 12:04:35 UTC, monarch_dodra wrote:
On Thursday, 29 May 2014 at 08:49:10 UTC, Chris wrote:
monarch_dodra:
Hm. This last point might be an issue. If I process a large
input (text in this case) then I might run into trouble with
append as a class variable. I also had
//*** CODE **
mixin(version = foo;);
version(foo)
{
void main(){}
}
//** END CODE ***
If it's illegal in D, what is the reason where is documented?
The reason I was considering such a construct is the following:
Some C libraries have an associated config.h header that
On Thu, 29 May 2014 10:45:28 -0400, safety0ff safety0ff@gmail.com
wrote:
//*** CODE **
mixin(version = foo;);
version(foo)
{
void main(){}
}
//** END CODE ***
If it's illegal in D, what is the reason where is documented?
The reason I was considering such a
On Thursday, 29 May 2014 at 15:02:48 UTC, Steven Schveighoffer
wrote:
Even if that is valid code, you are much better off using enums
and static if.
enum includeSomeFeature = ...
static if(includeSomeFeature)
{
...
}
These work much more like #defines, and can be seen outside the
module.
Vance Miller Kitchens really do represent excellent value for
money. No wonder Big kitchen stores hate Vance Miller Kitchens so
much.
I know that we can use MSVC to build a 64 bit program, but is it
also possible to use it to build a 32 bit program as well?
On Thursday, 29 May 2014 at 18:25:19 UTC, Jeremy DeHaan wrote:
I know that we can use MSVC to build a 64 bit program, but is
it also possible to use it to build a 32 bit program as well?
Yes of course it is possible.
It you are talking about Visual-D then it is possible there too.
Is there a way to read a text file into a sting at compile time
in D2 ?
It would be great to read for example some JSON file and then
parse it using CTFU and create some D code based on it.
string a = import(file.txt);
dmd yourprogram.d -Jlocation_of_file
so for example
dmd yourprogram.d -J.
if file.txt is in the same directory as the .d file.
On Thursday, 29 May 2014 at 20:21:32 UTC, Adam D. Ruppe wrote:
string a = import(file.txt);
dmd yourprogram.d -Jlocation_of_file
so for example
dmd yourprogram.d -J.
if file.txt is in the same directory as the .d file.
Excellent, thank you Adam!
Now another question is it also possible
Remo:
is it also possible to save/write string at compile time?
There is pragma(msg, ...) but it's a little crappy. There are
plans and a pull request for a good _ctWrite, but it's stalled
for reasons unknown to me.
Bye,
bearophile
On Thursday, 29 May 2014 at 20:38:30 UTC, Remo wrote:
Now another question is it also possible to save/write string
at compile time?
Sort of, use
pragma(msg, some string);
and it will be printed out when that code is compiled. Important
that it is when the code is compiled, NOT when the
On Thursday, 29 May 2014 at 20:44:09 UTC, bearophile wrote:
Remo:
is it also possible to save/write string at compile time?
There is pragma(msg, ...) but it's a little crappy. There are
plans and a pull request for a good _ctWrite, but it's stalled
for reasons unknown to me.
Bye,
On Thu, 29 May 2014 20:12:52 +
Remo via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote:
On Thursday, 29 May 2014 at 18:25:19 UTC, Jeremy DeHaan wrote:
I know that we can use MSVC to build a 64 bit program, but is
it also possible to use it to build a 32 bit program as well?
I'd like to get a list of all classes in the current module, so I
came up with this code:
class Test {}
class TestChild: Test {}
class TestChildChild: TestChild {}
void main()
{
foreach (item; __traits(allMembers, mixin(__MODULE__)))
{
static if
class Test {}
class TestChild: Test {}
class TestChildChild: TestChild {}
alias Alias(alias Symbol) = Symbol; // this does the trick
void main()
{
foreach (item; __traits(allMembers, mixin(__MODULE__)))
{
alias sym = Alias!(__traits(getMember, mixin(__MODULE__),
item));
On Thursday, 29 May 2014 at 23:18:32 UTC, Dicebot wrote:
class Test {}
class TestChild: Test {}
class TestChildChild: TestChild {}
alias Alias(alias Symbol) = Symbol; // this does the trick
void main()
{
foreach (item; __traits(allMembers, mixin(__MODULE__)))
{
alias sym =
Hi, in C++ I can use smart pointers to wrap raw pointers with
custom deleter to automatically manage C resources. Is there
anything like this in D?
https://issues.dlang.org/show_bug.cgi?id=12819
Issue ID: 12819
Summary: Refused purity conversion of immutable array of arrays
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords:
https://issues.dlang.org/show_bug.cgi?id=12816
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
https://issues.dlang.org/show_bug.cgi?id=12813
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
https://issues.dlang.org/show_bug.cgi?id=12699
hst...@quickfur.ath.cx changed:
What|Removed |Added
CC||hst...@quickfur.ath.cx
--
https://issues.dlang.org/show_bug.cgi?id=1452
Blake Anderton rbander...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=12820
Issue ID: 12820
Summary: DMD can inline calls to functions that use alloca,
allocating the memory in the caller function instead.
Product: D
Version: unspecified
Hardware: All
https://issues.dlang.org/show_bug.cgi?id=6474
monkeywork...@hotmail.com changed:
What|Removed |Added
CC||monkeywork...@hotmail.com
---
https://issues.dlang.org/show_bug.cgi?id=5030
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=5810
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Keywords||pull
Hardware|x86
https://issues.dlang.org/show_bug.cgi?id=11084
Vlad Levenfeld vlevenf...@gmail.com changed:
What|Removed |Added
CC||vlevenf...@gmail.com
https://issues.dlang.org/show_bug.cgi?id=12821
Issue ID: 12821
Summary: Missed redundant storage class / protection errors.
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity:
https://issues.dlang.org/show_bug.cgi?id=12821
Iain Buclaw ibuc...@gdcproject.org changed:
What|Removed |Added
Keywords||accepts-invalid, spec
https://issues.dlang.org/show_bug.cgi?id=12821
Iain Buclaw ibuc...@gdcproject.org changed:
What|Removed |Added
CC||ibuc...@gdcproject.org
201 - 231 of 231 matches
Mail list logo