Ok guys, thanks. Got it. Well, good to know. Any chance of knowing
when could this feature be implemented?
adam.
2010/11/9 Jonathan M Davis jmdavisp...@gmx.com:
On Monday, November 08, 2010 13:49:36 Adam Cigánek wrote:
Hello,
Why are multiple alias this declarations in a class/struct
Hello,
It seems that if function has no parameters, it's possible to omit the
parentheses when calling it:
string sayHello() {
return hello;
}
void main() {
writeln(sayHello); // same as writeln(sayHello());
}
Is this an actual defined (and documented) behaviour
...@yahoo.com:
On Mon, 08 Nov 2010 14:48:20 -0500, Adam Cigánek adam.ciga...@gmail.com
wrote:
Hello,
It seems that if function has no parameters, it's possible to omit the
parentheses when calling it:
string sayHello() {
return hello;
}
void main() {
writeln(sayHello
Hello,
Why are multiple alias this declarations in a class/struct not
allowed? This page
http://www.digitalmars.com/d/2.0/class.html#AliasThis says so, and
also dmd2 gives me an error when I try to do it, but TDPL says
something different (on page 231): a class could introduce any number
of alias
Hello,
why is the following code illegal?
import std.stdio;
void delegate() fun;
void capture(lazy void f) {
fun = f;
}
void main() {
capture(writeln(hello));
fun();
}
It says Error: lazy variables cannot be lvalues, pointing to the
fun = f line.
It can be worked
You could try 'identifier.stringof'. But I don't know if that'll give you
what you want, and .stringof does have a history of being buggy,
poorly-defined, and frequently changing.
Thanks, but stringof gives unqualified name as well. Are foo.stringof
and __traits(identifier, foo) the same
Hello,
Is there a function in the standard library to delete an element from
an array (or range)? Something like:
auto a = [1, 2, 3, 4, 5, 6];
auto b = delete(a, 4);
assert([1, 2, 3, 4, 6] == b);
I've noticed there is eliminate in std.algorithm, which seems to be
doing just that, but
, Adam Cigánek adam.ciga...@gmail.com
wrote:
Hello,
Is there a function in the standard library to delete an element from
an array (or range)? Something like:
auto a = [1, 2, 3, 4, 5, 6];
auto b = delete(a, 4);
assert([1, 2, 3, 4, 6] == b);
I've noticed there is eliminate
Your new example doesn't show it better, it's the only one you've given that
shows it at all. What you had originally was
auto a = [1, 2, 3, 4, 5, 6];
auto b = delete(a, 4);
assert([1, 2, 3, 4, 6] == b);
which shows the removal of the element at index 4, not the element with
value 4.
Thanks man, this was very exhaustive reply :)
This is what i was basically thinking, just wasn't sure. Also, didn't
know that typedef is deprecated. Guess that explains why is it not
mentioned in the book.
Thanks,
adam.
2010/10/21 bearophile bearophileh...@lycos.com:
Adam Cigánek:
What
Hello there,
What is the difference between alias and typedef?
Also, is it explained somewhere? I was searching the webs and the TDPL
book*, but haven't found anything :(
adam.
* sadly, it has no full text search, but since there is no mention of
typedef in the index, I'm assuming it's not
Hello there,
Could someone take a look at this bug:
http://www.dsource.org/projects/dsss/ticket/234 ? Or at least point me
the right way - I might give a try fixing it myself.
adam.
12 matches
Mail list logo