bearophile, el 4 de April a las 18:39 me escribiste:
Walter Bright:
Thank you for the answers.
Here's one:
enum Index { A, B, C }
T[Index.max] array; // Error: Index.max is not an int
...
array[B] = t; // Error: B is not an int
In the last months I've grown a moderate
Well, I didn't considering this D.announce worthy, but Andrei
suggested I post the news.
As the title suggests, after over 5 years in the games industry
I've decided to shake things up a bit and join Facebook at their
London office.
Unfortunately, that's about all there is to say at the
Good luck!
Will definately be looking forward to hearing how the influence
of D is spreading at Facebook over the next year or so.
On Friday, 4 April 2014 at 19:20:18 UTC, Adam Wilson wrote:
If that's not possible then it's still nice to know that I am
working with a type and not an identifier.
I furthermore fixed some reference finding + highlighting bugs,
some NREs, an SO regression and some further bugs, they're all
Am 05.04.2014 12:13, schrieb Peter Alexander:
Well, I didn't considering this D.announce worthy, but Andrei suggested
I post the news.
As the title suggests, after over 5 years in the games industry I've
decided to shake things up a bit and join Facebook at their London office.
Unfortunately,
Promising!
Congratulations and looking forward to more Facebook + D
announcements :)
On 4/5/14, Peter Alexander peter.alexander...@gmail.com wrote:
Well, I didn't considering this D.announce worthy, but Andrei
suggested I post the news.
Congrats!
As the title suggests, after over 5 years in the games industry
I've decided to shake things up a bit and join Facebook at their
On Friday, 4 April 2014 at 01:54:16 UTC, Ben Boeckel wrote:
There is *zero* rationale as to why this would be a compilable
implementation of comparison:
int compare(int a, int b) {
return a * b;
}
The fact that this compiles when used as a comparison is
*insane* when
you take
On 04/03/2014 04:45 AM, Walter Bright wrote:
On 4/2/2014 6:55 PM, Andrei Alexandrescu wrote:
A lot of them could apply to us as well.
https://www.youtube.com/watch?v=TS1lpKBMkgg
at about 44:00: I begged them not to do them [AST macros]. :-)
(This is a misquote.)
On 4/5/2014 2:40 AM, Leandro Lucarella wrote:
enum Symbolic { Dogs, Cars, Trees }// not implicitly casteable (and
// maybe not even expose the
// internal value)
?
struct Symbolic {
private static struct
On 4/5/2014 3:13 AM, Peter Alexander wrote:
Huge thanks to Andrei for referring me, and to Facebook for hiring me!
Congratulations!
On 4/5/2014 10:10 AM, Timon Gehr wrote:
On 04/03/2014 04:45 AM, Walter Bright wrote:
On 4/2/2014 6:55 PM, Andrei Alexandrescu wrote:
A lot of them could apply to us as well.
https://www.youtube.com/watch?v=TS1lpKBMkgg
at about 44:00: I begged them not to do them [AST macros]. :-)
(This
On Saturday, 5 April 2014 at 18:47:50 UTC, Walter Bright wrote:
In response to a question about macros reflection:
I begged them not to, not to just export the compiler to I
begged them I begged them not to do it.
A reboot is in progress on this, too:
http://scalareflect.org
Walter Bright, el 5 de April a las 11:04 me escribiste:
On 4/5/2014 2:40 AM, Leandro Lucarella wrote:
enum Symbolic { Dogs, Cars, Trees }// not implicitly casteable (and
// maybe not even expose the
// internal value)
On 4/5/2014 6:28 PM, Leandro Lucarella wrote:
Walter Bright, el 5 de April a las 11:04 me escribiste:
Of course, you can hide all this in a template.
Well, you can emulate enums as they are now with structs too, so that
doesn't change anything in the argument about why to provide syntax
On Saturday, 5 April 2014 at 03:06:30 UTC, cmplx wrote:
Why all the links not opening ?
Forbidden
You don't have permission to access /download.html on this
server.
Forbidden
You don't have permission to access /comparison.html on this
server.
Forbidden
You don't have permission to
On Friday, 4 April 2014 at 02:10:15 UTC, dnewbie wrote:
Please vote now!
http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5
See also results from previous years:
- http://d.darktech.org/2012.png
- http://d.darktech.org/2013.png
I've checked the repositories, D in production since
On Friday, 4 April 2014 at 22:17:45 UTC, Dicebot wrote:
#2 should not compile. D currently does not have any notion of
namespaces other than modules / aggregates and I am against
introducing those just for the sake of interfacing with C++.
If you want to interface with C++ you should do it
On Saturday, 5 April 2014 at 03:06:30 UTC, cmplx wrote:
Why all the links not opening ?
Forbidden
Same here ... forum is online but main website is unavailable.
Wow many questions. I'll try my best but I'm not the most
knowledgeable person out there.
On Friday, 4 April 2014 at 01:20:43 UTC, Bill Buckels wrote:
On Thursday, 3 April 2014 at 21:06:52 UTC, Andrej Mitrovic
wrote:
This seems out of place? What about D for .NET?
That was really my
On 04/05/2014 02:28 AM, Adam D. Ruppe wrote:
I had this problem too with the new dmd version on a CentOS server.
My solution was to link it manually. First, run your dmd command with -v
at the end to get the verbose output. The last line it outputs will be
the linking command.
Copy/paste that
cmplx magii...@mail.ru schrieb im Newsbeitrag
news:jvdtaskuqavqdiucf...@forum.dlang.org...
Why all the links not opening ?
Still down here.
Is there another way to access the phobos doc?
On Saturday, 5 April 2014 at 11:22:03 UTC, Christof Schardt wrote:
cmplx magii...@mail.ru schrieb im Newsbeitrag
news:jvdtaskuqavqdiucf...@forum.dlang.org...
Why all the links not opening ?
Still down here.
Is there another way to access the phobos doc?
I can still access Phobos on the web
On Saturday, 5 April 2014 at 11:31:41 UTC, uri wrote:
On Saturday, 5 April 2014 at 11:22:03 UTC, Christof Schardt
wrote:
cmplx magii...@mail.ru schrieb im Newsbeitrag
news:jvdtaskuqavqdiucf...@forum.dlang.org...
Why all the links not opening ?
Still down here.
Is there another way to access
On Saturday, 5 April 2014 at 08:42:27 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 4 April 2014 at 22:17:45 UTC, Dicebot wrote:
#2 should not compile. D currently does not have any notion of
namespaces other than modules / aggregates and I am against
introducing those just for the sake of
On 03/25/14 14:30, Steven Schveighoffer wrote:
Of course naturally, with all things this low-level, we have to make
decisions as to what is *provably* @safe/pure/nothrow, and what is
*logically* @safe/pure/nothrow. The most obvious example is memory allocation
-- It is technically not pure
On Saturday, 5 April 2014 at 12:07:36 UTC, Dicebot wrote:
D has own tools to disambugate symbols. Introducing new ones is
equivalent to admitting D module system does not work by design.
I think it is primarily a notation issue. Should the notation
help you discern what is C++ and what is D,
That works too. I think I like the solution above better for now,
I just have to figure out how to generalise it into a template
mixin so I don't have to write it out over and over again.
Atila
On Friday, 4 April 2014 at 14:24:55 UTC, Dicebot wrote:
On Friday, 4 April 2014 at 09:22:16 UTC,
On Saturday, 5 April 2014 at 12:30:28 UTC, Ola Fosheim Grøstad
wrote:
Should the notation help you discern what is C++ and what is D,
or do you have to memorize symbols? How much extra notational
work is it acceptable to impose on the programmer?
It shouldn't. The fact how entity is exposed
On Saturday, 5 April 2014 at 12:58:54 UTC, Dicebot wrote:
It shouldn't. The fact how entity is exposed via some external
binary interface should not have any notable impact on D side
of things (unless you dwell into ABI realm).
This is a design philosophical issue, you can make it normative
uri gm...@gmail.com schrieb im Newsbeitrag
news:utskrusuysuoimrnh...@forum.dlang.org...
On Saturday, 5 April 2014 at 11:31:41 UTC, uri wrote:
On Saturday, 5 April 2014 at 11:22:03 UTC, Christof Schardt wrote:
cmplx magii...@mail.ru schrieb im Newsbeitrag
Thanks for the suggestions! I think then I will stay with
a wrapping struct. How would I make the extern C functions
invisible for other sources?
extern (C) c_ulong loadFont(char * path);
extern (C) void render(c_ulong font, char * text);
extern (C) void destroyFont(c_ulong font);
struct Font
On 04/03/2014 09:55 PM, Andrei Alexandrescu wrote:
...
Anyhow de gustibus.
There's good and bad taste.
Not that I ever do this, but I think you need to deal with this
C++ construct:
namespace exposed_ns {
using namespace internal_ns_2134zxdssdffrandomblablah;
using namespace internal_ns_2634zasdsfsdrandomblablah;
using namespace internal_ns_2993adsfadsfrandomblablah;
}
To do this in D you
On Saturday, 5 April 2014 at 13:11:27 UTC, Ola Fosheim Grøstad
wrote:
On Saturday, 5 April 2014 at 12:58:54 UTC, Dicebot wrote:
It shouldn't. The fact how entity is exposed via some external
binary interface should not have any notable impact on D side
of things (unless you dwell into ABI
On Saturday, 5 April 2014 at 15:24:32 UTC, Dicebot wrote:
This is very practical thing. By introducing special constructs
to support some foreign language you open the can of worms.
Yep, but I believe C++ is increasingly going to replace C as a
language for writing basic libraries and engines
On Saturday, 5 April 2014 at 03:06:30 UTC, cmplx wrote:
Why all the links not opening ?
Appears to be fixed now.
On 4/4/14, 8:06 PM, cmplx wrote:
Why all the links not opening ?
Apologies, it was a runaway chmod. Fixed now.
Andrei
On Saturday, 5 April 2014 at 13:55:27 UTC, Róbert László Páli
wrote:
When released as a library I would simply not put them
in the di Files, but I do not really want to use di-s for
developing the lib, but generate them for release.
Can I declare these extern C functions inline the
methods using
On Friday, 4 April 2014 at 02:10:15 UTC, dnewbie wrote:
Please vote now!
http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5
See also results from previous years:
- http://d.darktech.org/2012.png
- http://d.darktech.org/2013.png
I'd been aware of D since around 2008, but didn't
On Saturday, 5 April 2014 at 15:24:32 UTC, Dicebot wrote:
This is very practical thing. By introducing special constructs
to support some foreign language you open the can of worms.
Where does one stop? Should we also expect adding some new
idioms for better JNI support? Or Python? I can't see
On Thursday, 3 April 2014 at 16:07:06 UTC, Meta wrote:
On Wednesday, 2 April 2014 at 14:31:49 UTC, Wyatt wrote:
This is a good base. In general, I would suggest not shying
away from subheadings. It gives you more opportunities to
catch the eye and tends to allow readers to see the parts that
On 4/5/2014 8:24 AM, Dicebot wrote:
This is very practical thing. By introducing special constructs to support some
foreign language you open the can of worms. Where does one stop? Should we also
expect adding some new idioms for better JNI support? Or Python? I can't see any
reason why C++ has
On 4/2/2014 3:07 PM, Walter Bright wrote:
One downside of this proposal is that if we ever (perish the thought!) attempted
to interface to C++ templates, this design would preclude that.
Yes, this seems to be a fatal flaw. Another design that has evolved from these
discussions and my
On 4/4/2014 8:51 PM, Simen Kjærås wrote:
On 2014-04-04 02:10, dnewbie wrote:
Please vote now!
http://www.easypolls.net/poll.html?p=533e10e4e4b0edddf89898c5
See also results from previous years:
- http://d.darktech.org/2012.png
- http://d.darktech.org/2013.png
These things make me feel old.
Upcoming features in C# (the text contains some extraneous chars,
like in the 0b0010\_1110; literal):
https://gist.github.com/anonymous/9997622
Declaring out arguments at the calling point is nice, but
returning a tuple as in Python/Haskell is better:
GetCoordinates(out var x, out var y);
On Saturday, 5 April 2014 at 20:47:29 UTC, Walter Bright wrote:
On 4/2/2014 3:07 PM, Walter Bright wrote:
One downside of this proposal is that if we ever (perish the
thought!) attempted
to interface to C++ templates, this design would preclude that.
Yes, this seems to be a fatal flaw.
On 4/5/2014 2:31 PM, Tove wrote:
How could this common pattern look?
std::string
boost::fun(std::string arg)
alias cpp= extern (C++, namespace = std);
alias boost = extern (C++, namespace = boost);
cpp.string
boost.fun(cpp.string arg)
?
extern (C++, namespace = std) {
struct string
Today I've found a good alternative to slow gcc's linker: gold.
Written by Google in C++ it's a linker writen for large code
bases with C++ in mind. The author claims it's about 5 times fast
than gcc's one. It does support ELF only and UNIX-like symtem I
think it's enough to dmd on linux or
On 4/5/2014 1:54 AM, Martin Nowak wrote:
On 04/02/2014 08:34 AM, Nick Sabalausky wrote:
Sorry for asking this here, but I'm in a bit of a bind: Anyone know of a
decent alternative to StartSSL?
No free alternative that I know of.
Digging around, I found http://www.cacert.org/ which I think I
On 2014-04-05 20:47:32 +, Walter Bright newshou...@digitalmars.com said:
On 4/2/2014 3:07 PM, Walter Bright wrote:
One downside of this proposal is that if we ever (perish the thought!)
attempted
to interface to C++ templates, this design would preclude that.
Yes, this seems to be a
On Saturday, 5 April 2014 at 21:47:33 UTC, Asman01 wrote:
Today I've found a good alternative to slow gcc's linker: gold.
Written by Google in C++ it's a linker writen for large code
bases with C++ in mind. The author claims it's about 5 times
fast than gcc's one. It does support ELF only and
On 4/5/2014 2:55 PM, Michel Fortin wrote:
I like this idea. But... should this potentially useful thing really be
restricted to extern C++ things? I've seen at least one attempt to create a
namespace using what D currently offers [1], and frankly something like the
above would make much more
Michel Fortin:
Here's a suggestion:
@namespace A.B { // can create two levels at once, yeah!
void foo();
void bar();
}
@namespace C {
void foo();
}
Make those C++ declarations, it does not look too foreign
On Saturday, 5 April 2014 at 22:30:28 UTC, Joakim wrote:
on Arch that's gold.
it is? Not for me, unless I'm missing something.
On Saturday, 5 April 2014 at 22:30:28 UTC, Joakim wrote:
On Saturday, 5 April 2014 at 21:47:33 UTC, Asman01 wrote:
Today I've found a good alternative to slow gcc's linker:
gold. Written by Google in C++ it's a linker writen for large
code bases with C++ in mind. The author claims it's about
On Saturday, 5 April 2014 at 22:30:28 UTC, Joakim wrote:
Dmd already uses whatever the system linker is and on Arch
that's gold. The Android NDK also uses gold by default, though
they also provide the original bfd ld and a newer llvm-based
linker started by MediaTek, mclinker:
On Sunday, 6 April 2014 at 00:26:12 UTC, deadalnix wrote:
On Saturday, 5 April 2014 at 22:30:28 UTC, Joakim wrote:
Dmd already uses whatever the system linker is and on Arch
that's gold. The Android NDK also uses gold by default,
though they also provide the original bfd ld and a newer
On 4/5/14, 2:47 PM, Asman01 wrote:
Today I've found a good alternative to slow gcc's linker: gold. Written
by Google in C++ it's a linker writen for large code bases with C++ in
mind. The author claims it's about 5 times fast than gcc's one. It does
support ELF only and UNIX-like symtem I think
On 2014-04-05 20:47:32 +, Walter Bright newshou...@digitalmars.com said:
Yes, this seems to be a fatal flaw. Another design that has evolved
from these discussions and my discussions with Andrei on it:
extern (C++, namespace = A.B) { void foo(); void bar(); }
extern (C++,
I realize this isn't the time for such a thing to be added to D, but I
thought I'd put the idea out there, FWIW:
I find myself frequently needing to design APIs that work like this:
func( [optionalFoo], [optionalBar] )
Typically, that's not permitted in C-style languages, including D.
On 4/5/2014 9:26 PM, Nick Sabalausky wrote:
It would be *fantastic* if D recognized the disambiguation of using
incompatible types and permitted this:
interface Foo {}
interface Bar {}
class FooBar : Foo, Bar {}
void func(Foo foo=someFoo, Bar bar=someBar) {...}
Dear sirs and madams and... Other things on internet forums,
I am attempting to write a program, and I was wondering how to
get the time difference between point a and point b. For example
long a, b;
int thingy;
this()
{
a = 0; // Or whatever function should be used to set an initial
On Sunday, 6 April 2014 at 02:12:41 UTC, MrOverkill wrote:
Dear sirs and madams and... Other things on internet forums,
I am attempting to write a program, and I was wondering how to
get the time difference between point a and point b.
You should look into:
On 4/5/2014 6:26 PM, Michel Fortin wrote:
What if you also have a C++ foo at global scope?
It'll work exactly the same as import does.
module cpptest;
extern (C++) void foo();
extern (C++, namespace = A) void foo();
foo(); // ambiguous
A.foo(); // works
On Sunday, 6 April 2014 at 02:31:29 UTC, safety0ff wrote:
On Sunday, 6 April 2014 at 02:12:41 UTC, MrOverkill wrote:
Dear sirs and madams and... Other things on internet forums,
I am attempting to write a program, and I was wondering how to
get the time difference between point a and point b.
Am Wed, 02 Apr 2014 18:05:32 -0700
schrieb Walter Bright newshou...@digitalmars.com:
On 4/2/2014 3:06 PM, bearophile wrote:
Walter Bright:
I don't see why not. Note that we couldn't do this for extern(C)
functions, or
variadics, or caller functions with parameters that need
On Saturday, 5 April 2014 at 01:28:06 UTC, bearophile wrote:
Can you spot the difference between foo1 and foo2?
import std.algorithm: map;
import std.range: iota;
void foo1(in int[] a, in int[] b) pure {
int[] r;
foreach (immutable i; 0 .. a.length)
r ~= (i % 2) ? a[i] : b[i];
John Colvin:
I think there's an argument that this should work, on the
grounds that the context pointer is just another argument and
therefore the lambda can be weakly pure.
Was this discussed in the forum? Do you think you can ask for an
enhancement in Bugzilla?
Bye,
bearophile
Hi,
i want to generate header (di) files for a library I developed
and faced some issues.
The project structure is:
source
-wba
--com
---defintions.d
---...
--dispatcher.d
--...
--package.d
MonoDevelop generated following statement for me:
C:\D\dmd2\windows\bin\dmd.exe -debug -gc
On Saturday, 5 April 2014 at 10:00:13 UTC, Andre wrote:
Hi,
i want to generate header (di) files for a library I developed
and faced some issues.
The project structure is:
source
-wba
--com
---defintions.d
---...
--dispatcher.d
--...
--package.d
MonoDevelop generated following statement for
On Saturday, 5 April 2014 at 10:00:13 UTC, Andre wrote:
2) property methods doesn't work with header files.
For this coding:
@property docHostUIHandler()
{
return this._docHostUIHandler;
}
This di coding was created:
@property docHostUIHandler();
Am 05.04.2014 12:49, schrieb evilrat:
i have little info about this, but let me clear something for you.
- interface generation is outdated/broken
- .di files should be avoided now, this is why import looking for .d
only, but idk why.
- to avoid @property issue you can try adding export
On Saturday, 5 April 2014 at 10:55:19 UTC, evilrat wrote:
// recommended, manual type
@property HostUIHandlerType()
{
return this._docHostUIHandler;
}
oops. this of course should be like normal function.
On 2014-04-04 15:25, Marc Schütz schue...@gmx.net wrote:
This is unfortunately only true on x86 32-bit. For x86_64, the calling
conventions (MS, SysV [1]) say that the first few parameters are passed
in registers, and the same is probably true for other architectures.
I'm not so familiar with
On Saturday, 5 April 2014 at 11:28:36 UTC, Jacob Carlborg wrote:
On 2014-04-04 15:25, Marc Schütz schue...@gmx.net wrote:
This is unfortunately only true on x86 32-bit. For x86_64, the
calling
conventions (MS, SysV [1]) say that the first few parameters
are passed
in registers, and the same
And why is RAII verbose?
I have a transactional struct:
struct Tans {
bool committed;
this(..) {
committed = false;
.. set up
}
void commit() {
.. commit
committed = true;
}
~this() {
if(!committed) {
.. roll back commit
}
}
}
I want to use this in a lot of
On Sat, 05 Apr 2014 15:40:13 +, Byron wrote:
And why is RAII verbose?
I have a transactional struct:
struct Tans {
bool committed;
this(..) {
committed = false;
.. set up
}
void commit() {
.. commit committed = true;
}
~this() {
if(!committed) {
On 04/05/2014 08:48 AM, Byron wrote:
Tans trans(...); would not work
It works in C++. The following is one way of constructing in D:
Tans trans = Tans(42);
Ali
A regular function would work too:
alas, no inline guarantee. and speed is critical there.
On Saturday, 5 April 2014 at 15:40:13 UTC, Byron wrote:
auto tans = Tans(...); /// calls destructor on the blit?
This does NOT call postblit nor destructor. It's an actual
declaration syntax.
auto tans = Tans.init;
Will not call postblit either.
Finally:
auto tans =
On 2014-04-05 15:08, Marc Schütz schue...@gmx.net wrote:
Yes, but it doesn't necessarily contain `s` anymore. Today's compilers
are intelligent enough to see that `s` is never used after the function
call, and therefore don't even allocate a stack slot for it.
Ok, I see.
`foo` could be
On 04/05/2014 11:53 AM, bearophile wrote:
John Colvin:
I think there's an argument that this should work, on the grounds that
the context pointer is just another argument and therefore the lambda
can be weakly pure.
Was this discussed in the forum?
I've been bringing this up time and time
Timon Gehr:
It's a plain bug. In fact, you have commented on it:
https://d.puremagic.com/issues/show_bug.cgi?id=9148
That issue is significant.
Thank you Timon. Apparently my memory is not very good :-)
Bye,
bearophile
On 04/05/14 21:51, Timon Gehr wrote:
On 04/05/2014 11:53 AM, bearophile wrote:
John Colvin:
I think there's an argument that this should work, on the grounds that
the context pointer is just another argument and therefore the lambda
can be weakly pure.
Was this discussed in the forum?
I'm working on a feature in DMD to query lexical, syntactic and
semantic context at a given byte offset in a given source file.
In the long run my vision is to add libclang-like functionality
directly into DMD and a specific mode in DMD that just starts up
DMD to query some information at a
On 04/05/2014 10:33 PM, Artur Skawina wrote:
On 04/05/14 21:51, Timon Gehr wrote:
On 04/05/2014 11:53 AM, bearophile wrote:
John Colvin:
I think there's an argument that this should work, on the grounds that
the context pointer is just another argument and therefore the lambda
can be weakly
Hello all! I am having trouble running a program I am writing
without using a script. Here is what I am using to compile.
dmd main.d fileloader.d tokenizer.d globals.d namefunctions.d
misc.d math.d questions.d functions.d -L-ldl -gc
Then in a runner script I have this.
LD_LIBRARY_PATH=.
If I have an enum:
enum x {A : 1, B : 2, C : 100};
How can I get a list of all of its elements?
x.get_list() (returns [A, B, C])
On Sunday, 6 April 2014 at 02:25:32 UTC, dnspies wrote:
For instance, could I write a generic function to reconstruct
any object of any type from a JSON object?
Yes, you can use __traits(allMembers) at compile time to build a
runtime function that does the setting. .tupleof can do it too,
On Sunday, 6 April 2014 at 02:18:57 UTC, dnspies wrote:
If I have an enum:
enum x {A : 1, B : 2, C : 100};
How can I get a list of all of its elements?
x.get_list() (returns [A, B, C])
I believe this is what you're looking for:
On Sunday, 6 April 2014 at 02:21:35 UTC, dnspies wrote:
Is there a way to do a checked cast from a base type to an
enum-type (so that an exception is thrown if it fails)?
ie something like
enum x : dchar { A : 'a', B : 'b', C : 'c' };
x get_x() {
dchar r = get_char();
return cast(x)r;
On Sunday, 6 April 2014 at 00:12:00 UTC, Harpo wrote:
Then in a runner script I have this.
LD_LIBRARY_PATH=. ./main
This kind of thing is common in Linux, in fact, a lot of Linux
software consists of a runner script that sets LD_LIBRARY_PATH
and a separate binary file and its library .so
What's the syntax for a new empty dynamic array or associative
array?
Every time I want to set a AA, I have to say:
(supposing I already have some variable int[int] aa which points
to the wrong one)
int[int] throwaway;
aa = throwaway;
Is there a way to say something like:
aa = new
You can just set it to null. Then, next time you add anything to
it, a new one will be automatically created.
On Sunday, 6 April 2014 at 03:23:17 UTC, Adam D. Ruppe wrote:
You can just set it to null. Then, next time you add anything
to it, a new one will be automatically created.
What about if I have a 2D array (ie int[][]) and I want to append
an empty int[] on the end? Will this work?
int[][]
Can anyone please explain why this works:
auto numbers = sequence!(n)();
auto trimmed = setDifference(setDifference(numbers, sequence!(n
* a[0])(2)), sequence!(n * a[0])(3));
but this doesn't?
auto numbers = sequence!(n)();
auto trimmed = setDifference(numbers,
https://d.puremagic.com/issues/show_bug.cgi?id=12522
Summary: (void delegate() f) is not callable using argument
types (void function() pure nothrow @safe)
Product: D
Version: D2
Platform: All
OS/Version: All
https://d.puremagic.com/issues/show_bug.cgi?id=12523
Summary: false type deduced with inout append
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
https://d.puremagic.com/issues/show_bug.cgi?id=12523
--- Comment #1 from Martin Nowak c...@dawg.eu 2014-04-05 02:30:24 PDT ---
The const is added here.
https://github.com/D-Programming-Language/dmd/blob/aac09e539f7c3d9bd882d05f5c331f64733c6a29/src/statement.c#L1602
--
Configure issuemail:
1 - 100 of 111 matches
Mail list logo