Era Scarecrow:
But more likely it will be merged with another file, likely
std.bitmanip or something...
A Phobos pull request is OK even if it's meant to be merged with
std.bitmanip. Pull requests are not just for separate modules.
On GitHub people will be able to comment on single lines
On Sunday, 7 October 2012 at 09:48:50 UTC, Era Scarecrow wrote:
On Sunday, 7 October 2012 at 09:22:17 UTC, Denis Shelomovskij
wrote:
I'd like to see enum syntax for flug enum. So I dislike
function calls like `set_flag`, `checkAll`, etc. (IMHO)
You mean... binary basic syntax? That shouldn't
On Sunday, 14 October 2012 at 06:34:39 UTC, Era Scarecrow wrote:
I've added binary functionality. Looking at these notes I see I
forgot the enum/array part; And checking for binary true isn't
added yet. However I'll get to it sooner or later. Both
opBinary and opOpBinary are supported so far.
Era Scarecrow:
I can't get opOpAssign working properly, and it's worse with
arrays. Removing opOpAssign, everything else (arrays, single
flags, other flags) works properly.
Are such problems known? In bugzilla or here? Are those fixable?
It's likely the last time I'll update it for a
On Monday, 15 October 2012 at 02:54:38 UTC, bearophile wrote:
Era Scarecrow:
I can't get opOpAssign working properly, and it's worse with
arrays. Removing opOpAssign, everything else (arrays, single
flags, other flags) works properly.
Are such problems known? In bugzilla or here? Are those
K I have opOpAssign working. I may have to clean up
documentation a little and clean the unittests up a bit, but it
all appears to be working.
Feel free to give it a try.
I have added opSlice, which returns an array of your enum of all
the flags it qualifies for. An empty enum (say, zero)
06.10.2012 23:50, Era Scarecrow пишет:
On Wednesday, 26 September 2012 at 19:11:37 UTC, bearophile wrote:
I think it's a good idea to have a well written EnumFlags data
structure in Phobos. In C# this feature is even built-in. So issue
6946 is not closing, unless Andrei or Walter decide it's a
On Sunday, 7 October 2012 at 09:22:17 UTC, Denis Shelomovskij
wrote:
I'd like to see enum syntax for flug enum. So I dislike
function calls like `set_flag`, `checkAll`, etc. (IMHO)
You mean... binary basic syntax? That shouldn't be too hard. So
something like..?
Flags x;
with(Flags) {
25.09.2012 21:14, Denis Shelomovskij пишет:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this too.
How about to add a library solution to Phobos?
My variant is here (search for `flagEnum`):
https://bitbucket.org/denis_sh/misc/src/tip/stdd/typecons.d
It has a bug and I have no
On Wednesday, 26 September 2012 at 19:11:37 UTC, bearophile wrote:
I think it's a good idea to have a well written EnumFlags data
structure in Phobos. In C# this feature is even built-in. So
issue 6946 is not closing, unless Andrei or Walter decide it's
a bad idea to have something like this
25.09.2012 21:14, Denis Shelomovskij пишет:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this too.
How about to add a library solution to Phobos?
My variant is here (search for `flagEnum`):
https://bitbucket.org/denis_sh/misc/src/tip/stdd/typecons.d
It has a bug and I have no
On 26-Sep-12 21:39, Denis Shelomovskij wrote:
25.09.2012 21:14, Denis Shelomovskij пишет:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this too.
How about to add a library solution to Phobos?
My variant is here (search for `flagEnum`):
26.09.2012 21:52, Dmitry Olshansky пишет:
On 26-Sep-12 21:39, Denis Shelomovskij wrote:
25.09.2012 21:14, Denis Shelomovskij пишет:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this too.
How about to add a library solution to Phobos?
My variant is here (search for
On 26-Sep-12 22:17, Denis Shelomovskij wrote:
Please give me usage examples (unittests), and I will implement the
functionality. Now I don't understand what are n-state flags and what is
the difference with std.bitmanip.bitfields.
Well thinking more of it, bitfields indeed will do for a
Denis Shelomovskij:
OK. Looks like such functionality isn't needed and I don't have
to do a pull request. What about to close
http://d.puremagic.com/issues/show_bug.cgi?id=6946
with WONTFIX?
I think it's a good idea to have a well written EnumFlags data
structure in Phobos. In C# this
On Tuesday, 25 September 2012 at 17:13:44 UTC, Denis Shelomovskij
wrote:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need
this too. How about to add a library solution to Phobos?
+1.
Also I'm not sure:
* Should we support converting from a number to a flag enum?
+1.
* If so,
On Wednesday, 26 September 2012 at 18:16:54 UTC, Denis
Shelomovskij wrote:
Thanks for the answer, but still there are only few guys here
interesting in it to be included in Phobos, so WONTFIX-ing the
issue looks reasonable. I can just support this struct in my
library for you.
There are few
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this too.
How about to add a library solution to Phobos?
My variant is here (search for `flagEnum`):
https://bitbucket.org/denis_sh/misc/src/tip/stdd/typecons.d
It has a bug and I have no idea how to fix it:
`AB.init |= AB.a` and
On Tuesday, 25 September 2012 at 17:13:44 UTC, Denis Shelomovskij
wrote:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need
this too. How about to add a library solution to Phobos?
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=6946
Bye,
bearophile
25.09.2012 22:03, bearophile пишет:
On Tuesday, 25 September 2012 at 17:13:44 UTC, Denis Shelomovskij wrote:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this
too. How about to add a library solution to Phobos?
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=6946
On 25/09/2012 20:03, bearophile wrote:
On Tuesday, 25 September 2012 at 17:13:44 UTC, Denis Shelomovskij wrote:
.NET has FlagsAttribute, Java has EnumSet. Looks like we need this
too. How about to add a library solution to Phobos?
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=6946
Faux Amis:
Isn't there a way to retrieve all reserved words?
I think the answer is negative.
And, did you do a pull request?
I don't do those yet. And that code is just a prototype.
Bye,
bearophile
Faux Amis:
Isn't there a way to retrieve all reserved words?
This is a possibility:
assert(__traits(is_reserved_word, import));
Bye,
bearophile
23 matches
Mail list logo