On 29/06/16 05:11, Hiemlick Hiemlicker wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
It would be very cool if we could do
test(A) instead of test(myEnum.A).
by context, the compiler can look first in the scope for something named
A then look in the enum itself and prepend
On Wednesday, 29 June 2016 at 10:51:39 UTC, qznc wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
It would be very cool if we could do
test(A) instead of test(myEnum.A).
by context, the compiler can look
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
It would be very cool if we could do
test(A) instead of test(myEnum.A).
by context, the compiler can look first in the scope for
something named A then look in
On Wednesday, 29 June 2016 at 05:06:08 UTC, Hiemlick Hiemlicker
wrote:
On Wednesday, 29 June 2016 at 03:50:35 UTC, Carl Vogel wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick
[...]
Doesn't the with statement solve your problem here?
with (myEnum) {
test(A);
test(B);
On Wednesday, 29 June 2016 at 04:34:26 UTC, Chang Long wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
test(myEnum.A | myEnum.B & myEnum.C).
I like this:
myEnum.( A | B & C) == myEnum.A | myEnum.B & myEnum.C
Does that even work? Regardless, You still have
On Wednesday, 29 June 2016 at 03:50:35 UTC, Carl Vogel wrote:
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
[...]
Doesn't the with statement solve your problem here?
with (myEnum) {
test(A);
test(B);
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
test(myEnum.A | myEnum.B & myEnum.C).
I like this:
myEnum.( A | B & C) == myEnum.A | myEnum.B & myEnum.C
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker
wrote:
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
[...]
Doesn't the with statement solve your problem here?
with (myEnum) {
test(A);
test(B);
test(C);
}
Suppose one has void test(myEnum e)
enum myEnum
{
A,B,C
}
It would be very cool if we could do
test(A) instead of test(myEnum.A).
by context, the compiler can look first in the scope for
something named A then look in the enum itself and prepend myEnum
internally.
For flags, it would