On 2013-09-04 13:57, Rory McGuire wrote:
Thanks! a module declaration gets around that one.
http://dpaste.dzfl.pl/cff0ca5a line 21
I think this should already be fixed in git HEAD.
--
/Jacob Carlborg
Thanks! a module declaration gets around that one.
http://dpaste.dzfl.pl/cff0ca5a line 21
On Wed, Sep 4, 2013 at 1:18 PM, Jacob Carlborg wrote:
> On 2013-09-04 13:01, Rory McGuire wrote:
>
>> yip, :) can't think of a reason except it was interesting. wish dmd
>> didn't segfault when I used __MO
On 2013-09-04 13:01, Rory McGuire wrote:
yip, :) can't think of a reason except it was interesting. wish dmd
didn't segfault when I used __MODULE__.
on the plus side the requirement for a non basic type is the same
requirement that #golang has on its interfaces.
Do you have a module declaratio
yip, :) can't think of a reason except it was interesting. wish dmd didn't
segfault when I used __MODULE__.
on the plus side the requirement for a non basic type is the same
requirement that #golang has on its interfaces.
On Wed, Sep 4, 2013 at 12:48 PM, Dicebot wrote:
> On Wednesday, 4 Sept
On Wednesday, 4 September 2013 at 10:33:26 UTC, Rory McGuire
wrote:
I have a basic solution but it can't handle basic types LOL!
you have to
typedef them so that moduleName!T works.
Of course it can't, built-in types don't have any owning module,
those are not symbols. Why would you want to c
I have a basic solution but it can't handle basic types LOL! you have to
typedef them so that moduleName!T works.
and then the functions have to be declared in the same module as the type.
Or alternatively you have to specify the module to use e.g.
Implements!(T,MyInterface, "mymodule").
http://
Thanks, the exact example is exceptions. Was working really late the day
that it wasn't working :D my bad. The following is what I was after, which
I really thought I had tried.
class BaseException : Exception {
this(string s="", string file = __FILE__, int line = __LINE__) {
super(s,
On Wednesday, 4 September 2013 at 09:23:44 UTC, Rory McGuire
wrote:
thanks, yes, I just found that in TDPL. knew it was templates
but forgot
about template mixins.
Do you know how to get a default parameter like __MODULE__ or
__LINE__ to
be used from the calling site?
I've tried but I think m
thanks, yes, I just found that in TDPL. knew it was templates but forgot
about template mixins.
Do you know how to get a default parameter like __MODULE__ or __LINE__ to
be used from the calling site?
I've tried but I think my DMD is broken because it doesn't even work when I
subclass Exception().
On Wednesday, 4 September 2013 at 08:56:10 UTC, Rory McGuire
wrote:
A template should get evaluated in the calling context.
No, in D templates use declaration scope (unless they are
template mixins).
On Wednesday, 4 September 2013 at 08:44:45 UTC, Rory McGuire
wrote:
yes, it does seem to break if the Implements template func is
in a
different module to the free standing func.
hmph, how to get around that.
I don't think it is possible. You can possibly have several
modules with free stand
So the general idea would be to add:
mixin("import "~ mod ~";");
into the check() inner function but mod needs to come from somewhere.
I haven't been able to make it as a template yet.
A template should get evaluated in the calling context.
On Wed, Sep 4, 2013 at 10:44 AM, Rory McGuire wrote:
yes, it does seem to break if the Implements template func is in a
different module to the free standing func.
hmph, how to get around that.
On Wed, Sep 4, 2013 at 9:04 AM, Tobias Pankrath wrote:
> On Wednesday, 4 September 2013 at 00:56:55 UTC, Rory McGuire wrote:
>
>> I was wondering if its
On Wednesday, 4 September 2013 at 00:56:55 UTC, Rory McGuire
wrote:
I was wondering if its possible to do interfaces the way
#golang does it
but in #dlang.
Here is my first try: https://gist.github.com/rjmcguire/6431542.
Any help on making this smaller would be awesome.
Cheers,
R
Will this
On Wednesday, 4 September 2013 at 06:27:54 UTC, Rory McGuire
wrote:
On Wednesday, 4 September 2013 at 06:26:08 UTC, Rory McGuire
wrote:
On Wednesday, 4 September 2013 at 00:56:55 UTC, Rory McGuire
wrote:
I was wondering if its possible to do interfaces the way
#golang does it
but in #dlang.
H
On Wednesday, 4 September 2013 at 06:26:08 UTC, Rory McGuire
wrote:
On Wednesday, 4 September 2013 at 00:56:55 UTC, Rory McGuire
wrote:
I was wondering if its possible to do interfaces the way
#golang does it
but in #dlang.
Here is my first try:
https://gist.github.com/rjmcguire/6431542.
Any
On Wednesday, 4 September 2013 at 00:56:55 UTC, Rory McGuire
wrote:
I was wondering if its possible to do interfaces the way
#golang does it
but in #dlang.
Here is my first try: https://gist.github.com/rjmcguire/6431542.
Any help on making this smaller would be awesome.
Cheers,
R
Here is an
17 matches
Mail list logo