On Tuesday, 22 May 2018 at 14:56:52 UTC, Ethan wrote:
Repeat ad infinitum for each slightly different configuration
you want. I always make the point of programmers being lazy by
definition, and not being able to do something as simple as
declare a type with a single statement is an clear
On Tuesday, 22 May 2018 at 15:25:47 UTC, Jonathan M Davis wrote:
Honestly, I hate named argumts in general. This situation is
one of the few places I've ever run into where I thought that
they made any sense. [snip]
It's quite literally the only reason I ever want named arguments.
On Tuesday, May 22, 2018 14:53:50 Jacob Carlborg via Digitalmars-d wrote:
> On Tuesday, 22 May 2018 at 11:08:13 UTC, Jonathan M Davis wrote:
> > That's basically what dxml does except that it takes advantage
> > of the fact that each member is a different type (because each
> > is a differnt
On Monday, 21 May 2018 at 14:36:32 UTC, Jacob Carlborg wrote:
enum Options options = { foo: true, bar: false, a: 42, b:
"guess what this does" };
SomeObject!options o;
Yeah, so this is one reason why I went the parsing way.
enum Options Options1 = { foo: false, a: 5 };
SomeObject!Options1
On Tuesday, 22 May 2018 at 11:08:13 UTC, Jonathan M Davis wrote:
That's basically what dxml does except that it takes advantage
of the fact that each member is a different type (because each
is a differnt instance of std.typecons.Flag) so that it can
have a variadic function which takes any
On Monday, May 21, 2018 14:07:45 Jacob Carlborg via Digitalmars-d wrote:
> On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
> > Code for context:
> > https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/
> > binderoo/util/enumoptions.d
> >
> > Something struck me at DConf. I
On Monday, 21 May 2018 at 07:10:34 UTC, rikki cattermole wrote:
alias DocumentType = SomeDocument!( ObjectVersion._1_0,
ObjectEncoding.PlainASCII );
alias DocumentType2 = SomeDocument!( ObjectEncoding.UTF8,
ObjectVersion._2_0 );
typedef basic_stringstring;
typedef basic_string wstring;
On Monday, 21 May 2018 at 14:36:32 UTC, Jacob Carlborg wrote:
enum Options options = { foo: true, bar: false, a: 42, b:
"guess what this does" };
SomeObject!options o;
--
/Jacob Carlborg
I like this especially if you mix it with:
enum Options options = { foo: true, bar: false, a: 42, b:
On Monday, 21 May 2018 at 14:23:07 UTC, Steven Schveighoffer
wrote:
But how do you use it?
SomeObject!(Options(true, false, 42, "guess what this does"))
Yes, or if you want something more readable:
enum Options options = { foo: true, bar: false, a: 42, b: "guess
what this does" };
On 5/21/18 10:07 AM, Jacob Carlborg wrote:
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
Something struck me at DConf. I was watching the dxml talk and hearing
about
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
Something struck me at DConf. I was watching the dxml talk and
hearing about all these things that weren't being
On Monday, 21 May 2018 at 13:22:33 UTC, Steven Schveighoffer
wrote:
Filter was written before static foreach existed. This is a
pretty low-hanging fruit if anyone wants to try it out.
-Steve
I've gone to the effort after all, I might as well just port my
code across. I'll look in to it.
On 5/21/18 5:30 AM, Ethan wrote:
On Monday, 21 May 2018 at 03:30:37 UTC, Paul Backus wrote:
Am I missing something, or is this the same thing as `std.meta: Filter`?
Nope, I am missing something.
I don't find the std library documentation anywhere near as easy to look
through as something
On Monday, 21 May 2018 at 01:53:20 UTC, Manu wrote:
I don't really like that SomeObject() will be instantiated a
crap load of times for every possible combination and order of
options that a user might want to supply. How do you control
the bloat in a way that people won't mess up frequently?
On Monday, 21 May 2018 at 03:30:37 UTC, Paul Backus wrote:
Am I missing something, or is this the same thing as `std.meta:
Filter`?
Nope, I am missing something.
I don't find the std library documentation anywhere near as easy
to look through as something like cppreference.com, so I only
On 21/05/2018 12:13 PM, Ethan wrote:
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
Something struck me at DConf. I was watching the dxml talk and hearing
about all these things that weren't being implemented for one
On Monday, 21 May 2018 at 01:53:20 UTC, Manu wrote:
I don't really like that SomeObject() will be instantiated a
crap load of times for every possible combination and order of
options that a user might want to supply. How do you control
the bloat in a way that people won't mess up frequently?
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
But the functions, they're a bit trickier. So I made a new
trait in Binderoo's traits module called ExtractTupleOf. The
template prototype is the following:
template ExtractTupleOf( alias TestTemplate, Symbols... )
That first parameter is
I don't really like that SomeObject() will be instantiated a crap load
of times for every possible combination and order of options that a
user might want to supply. How do you control the bloat in a way that
people won't mess up frequently?
On 20 May 2018 at 17:58, Neia Neutuladh via
On Monday, 21 May 2018 at 00:13:26 UTC, Ethan wrote:
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
This looks good. One small caveat:
alias DocumentType = SomeDocument!(ObjectVersion._1_0,
ObjectEncoding.UTF8);
alias
Code for context:
https://github.com/GooberMan/binderoo/blob/master/binderoo_client/d/src/binderoo/util/enumoptions.d
Something struck me at DConf. I was watching the dxml talk and
hearing about all these things that weren't being implemented for
one reason or another. And I was thinking,
21 matches
Mail list logo