On Tuesday, 10 September 2013 at 21:16:56 UTC, H. S. Teoh wrote:
My first guess would be: _methods["test"]();
Variant doesn't wrap the function and thus won't know how to call
it; it doesn't implement opCall, and even if it did, it won't
know types the arguments and return value are.
My gue
On Tuesday, 10 September 2013 at 21:03:57 UTC, Andrej Mitrovic
wrote:
Bug or feature?
You will get a linker error when you try to use the function.
This is a feature, because you can implement this function
later or
even in another module (and set mangling to match).
Example of the former:
On Tue, Sep 10, 2013 at 10:09:33PM +0200, Gary Willoughby wrote:
> How to call a delegate held in a Variant array? I'm toying with some
> dynamic delegate code and wondered if i put a delegate in a Variant
> how would i call it?
>
> class C
> {
> private Variant[string] _methods;
>
>
> Bug or feature?
You will get a linker error when you try to use the function.
This is a feature, because you can implement this function later or
even in another module (and set mangling to match).
Example of the former:
-
interface A {
public:
final void bar(); // declaration
/
Code:
import std.stdio;
interface A {
public:
final void bar();
}
class B : A {
}
void main()
{
}
No message.
But:
import std.stdio;
interface A {
public:
void bar();
}
class B : A {
}
void main()
{
}
Gives the correc
How to call a delegate held in a Variant array? I'm toying with
some dynamic delegate code and wondered if i put a delegate in a
Variant how would i call it?
class C
{
private Variant[string] _methods;
public void addMethod(T)(string name, T func)
{
this
On Tuesday, 10 September 2013 at 16:45:33 UTC, H. S. Teoh wrote:
On Tue, Sep 10, 2013 at 06:00:53PM +0200, Paolo Invernizzi
wrote:
Johannes Pfau wrote something like this, in the logger thread:
>If you write code like this:
>
>void log(string file = __FILE__)() //A template
>{
> logImpl(file);
On Tuesday, 10 September 2013 at 18:42:16 UTC, Jonathan M Davis
wrote:
What seemed to have convinced Walter was this interview
http://www.artima.com/intv/nonvirtualP.html
where the focus was on code maintainability and how C#'s
approach to
virtuality supported code versioning. However, most of
On Tuesday, September 10, 2013 18:53:32 Joseph Rushton Wakeling wrote:
> On 10/09/13 11:32, Jonathan M Davis wrote:
> > AFAIK, no official decision has ever been made. It seemed like Walter was
> > convinced that it was worth it to make non-virtual the default, and some
> > discussion went into how
On Tuesday, 10 September 2013 at 16:58:54 UTC, H. S. Teoh wrote:
On Tue, Sep 10, 2013 at 06:50:03PM +0200, Dicebot wrote:
On Tuesday, 10 September 2013 at 16:45:33 UTC, H. S. Teoh
wrote:
>but you can get rid of this with link-time optimization (on
>Posix,
>you'd add -L-gc-sections to your dmd c
On Tue, Sep 10, 2013 at 06:00:53PM +0200, Paolo Invernizzi wrote:
> Johannes Pfau wrote something like this, in the logger thread:
>
> >If you write code like this:
> >
> >void log(string file = __FILE__)() //A template
> >{
> > logImpl(file);
> >}
> >void logImpl(string file){} //Not a template
On 10/09/13 11:32, Jonathan M Davis wrote:
AFAIK, no official decision has ever been made. It seemed like Walter was
convinced that it was worth it to make non-virtual the default, and some
discussion went into how to do the transition, but I don't believe that Andrei
has ever liked the idea, and
On Tue, Sep 10, 2013 at 06:50:03PM +0200, Dicebot wrote:
> On Tuesday, 10 September 2013 at 16:45:33 UTC, H. S. Teoh wrote:
> >but you can get rid of this with link-time optimization (on Posix,
> >you'd add -L-gc-sections to your dmd command-line: this will cause ld
> >to delete code sections that
On Tuesday, 10 September 2013 at 16:45:33 UTC, H. S. Teoh wrote:
but you can get rid of this with link-time
optimization (on Posix, you'd add -L-gc-sections to your dmd
command-line: this will cause ld to delete code sections that
are never
referenced, which includes the log() instantiations if
On Tuesday, 10 September 2013 at 16:00:55 UTC, Paolo Invernizzi
wrote:
Johannes Pfau wrote something like this, in the logger thread:
If you write code like this:
void log(string file = __FILE__)() //A template
{
logImpl(file);
}
void logImpl(string file){} //Not a template
The compiler can
Johannes Pfau wrote something like this, in the logger thread:
If you write code like this:
void log(string file = __FILE__)() //A template
{
logImpl(file);
}
void logImpl(string file){} //Not a template
The compiler can always inline the log template. So there's no
template bloat as there w
On Tuesday, 10 September 2013 at 10:53:15 UTC, Kenji Hara wrote:
On Tuesday, 10 September 2013 at 08:04:48 UTC, Namespace wrote:
Currently, all of array types does not allow copy-conversion
like ushort to short for their elements.
In old D1 age, static array did not have value semantics, so
t
On Tuesday, 10 September 2013 at 10:42:44 UTC, Gary Willoughby
wrote:
On Friday, 16 August 2013 at 09:52:53 UTC, Gary Willoughby
wrote:
You might be onto something here as i only import this module
into unit tests. When i get time i'll investigate a little
further.
If i take the import out of
On 09/10/2013 01:46 PM, Timon Gehr wrote:
On 09/10/2013 02:28 AM, Andrei Alexandrescu wrote:
...
After I've seen a pretty cool demo of clang-modernize
(http://clang.llvm.org/extra/ModernizerUsage.html), I think the best way
to attack this and similar problems is to add a class hierarchy
analyze
On 09/10/2013 02:28 AM, Andrei Alexandrescu wrote:
...
After I've seen a pretty cool demo of clang-modernize
(http://clang.llvm.org/extra/ModernizerUsage.html), I think the best way
to attack this and similar problems is to add a class hierarchy
analyzer: a command-line utility that is fed an en
Another idea:
Currently the protection labels, like public, private etc. , can
be restored. But other modifier, like const, nothrow, @safe or,
in this case, final can't. I suggest to change this. We could use
default for that purpose. Default could interrupt all modifier
labels and would resto
On 2013-09-10 11:04, Anton Alexeev wrote:
Can be but not libphobos2
Link statically with it, which is does by default. Just compile with:
dmd -L-lcurl test.d
--
/Jacob Carlborg
On Tuesday, 10 September 2013 at 08:04:48 UTC, Namespace wrote:
Currently, all of array types does not allow copy-conversion
like ushort to short for their elements.
In old D1 age, static array did not have value semantics, so
the behavior was expected.
In D2, static array had changed to value
On Friday, 16 August 2013 at 09:52:53 UTC, Gary Willoughby wrote:
You might be onto something here as i only import this module
into unit tests. When i get time i'll investigate a little
further.
If i take the import out of the unit test and place it at the top
of my source file everything wo
On Tuesday, 10 September 2013 at 09:32:58 UTC, Jonathan M Davis
wrote:
AFAIK, no official decision has ever been made. It seemed like
Walter was
convinced that it was worth it to make non-virtual the default,
and some
discussion went into how to do the transition, but I don't
believe that Andre
On Tuesday, 10 September 2013 at 09:35:34 UTC, Jonathan M Davis
wrote:
On Tuesday, September 10, 2013 10:22:17 Namespace wrote:
I have already found an old bug report for this, but I do not
understand why it has still not been solved. Can someone
explain
that to me?
Simple. No one has gotten
On Tuesday, September 10, 2013 10:22:17 Namespace wrote:
> I have already found an old bug report for this, but I do not
> understand why it has still not been solved. Can someone explain
> that to me?
Simple. No one has gotten around to fixing it, just like with any other bug
that hasn't been fi
On Tuesday, September 10, 2013 11:27:40 Simen Kjaeraas wrote:
> On Tue, 10 Sep 2013 02:28:24 +0200, Andrei Alexandrescu
>
> wrote:
> > On 9/9/13 12:47 PM, H. S. Teoh wrote:
> >> On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote:
> >>> It's been a while since Manu convinced Walter and Andr
On Tue, 10 Sep 2013 02:28:24 +0200, Andrei Alexandrescu
wrote:
On 9/9/13 12:47 PM, H. S. Teoh wrote:
On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote:
It's been a while since Manu convinced Walter and Andrei to
introduce a virtual Keyword and to change the default from virtual
meth
On Tuesday, 10 September 2013 at 07:02:17 UTC, Jacob Carlborg
wrote:
On 2013-09-06 23:31, Anton Alexeev wrote:
I've written a program which uses curl library. So on a PC
without curl
the program will not work until you install the library. Is
there a way
to put the curl library in the executab
On Tuesday, 10 September 2013 at 08:22:18 UTC, Namespace wrote:
I have already found an old bug report for this, but I do not
understand why it has still not been solved. Can someone
explain that to me?
Example:
a.d:
module a;
private import std.stdio : writeln;
b.d:
import a
I have already found an old bug report for this, but I do not
understand why it has still not been solved. Can someone explain
that to me?
Example:
a.d:
module a;
private import std.stdio : writeln;
b.d:
import a;
void main() {
writeln("This is wrong.");
}
WTF?
Currently, all of array types does not allow copy-conversion
like ushort to short for their elements.
In old D1 age, static array did not have value semantics, so
the behavior was expected.
In D2, static array had changed to value type, but the behavior
was not changed.
As far as I know, the
On Tuesday, 10 September 2013 at 00:28:24 UTC, Andrei
Alexandrescu wrote:
On 9/9/13 12:47 PM, H. S. Teoh wrote:
On Mon, Sep 09, 2013 at 09:37:07PM +0200, Namespace wrote:
It's been a while since Manu convinced Walter and Andrei to
introduce a virtual Keyword and to change the default from
virt
On 2013-09-10 02:28, Andrei Alexandrescu wrote:
After I've seen a pretty cool demo of clang-modernize
(http://clang.llvm.org/extra/ModernizerUsage.html), I think the best way
to attack this and similar problems is to add a class hierarchy
analyzer: a command-line utility that is fed an entire pr
On 2013-09-06 23:31, Anton Alexeev wrote:
I've written a program which uses curl library. So on a PC without curl
the program will not work until you install the library. Is there a way
to put the curl library in the executable?
On Linux, doesn't all distributions ship with libcurl by default?
On 2013-09-09 19:15, H. S. Teoh wrote:
I don't think UFCS works with qualified names right now. This is a known
issue.
As far as I know it's a design decision.
--
/Jacob Carlborg
37 matches
Mail list logo