On Tue, Mar 10, 2009 at 9:54 PM, Nick Sabalausky wrote:
> "MIURA Masahiro" wrote in message
> news:gp730i$30e...@digitalmars.com...
>> In D2:
>>
>> enum Shape: string
>> {
>> Square = "Square",
>> Circle = "Circle",
>> }
>>
>> void main()
>> {
>> assert(cast(string) Shape.Square == "Squa
"MIURA Masahiro" wrote in message
news:gp730i$30e...@digitalmars.com...
> In D2:
>
> enum Shape: string
> {
>Square = "Square",
>Circle = "Circle",
> }
>
> void main()
> {
>assert(cast(string) Shape.Square == "Square");
> }
So there's no built-in way to do this with compile-time refl
Nick Sabalausky wrote:
> Is there any way to do this (preferably in D1) with reflection? (ie, without
> having to manually create a conversion func/lookup for every value of every
> enum.)
>
> --
> enum Shape
> {
> Square, Circle
> }
> char[] foo(Shape s)
> {
> // ?
In D2:
enum Shape: string
{
Square = "Square",
Circle = "Circle",
}
void main()
{
assert(cast(string) Shape.Square == "Square");
}
Is there any way to do this (preferably in D1) with reflection? (ie, without
having to manually create a conversion func/lookup for every value of every
enum.)
--
enum Shape
{
Square, Circle
}
char[] foo(Shape s)
{
// ?
}
// Either one of these, I don't really ca
On 10.03.2009 19:38, Simen Haugen wrote:
Jarrett Billingsley wrote:
On Tue, Mar 10, 2009 at 1:45 PM, Simen Haugen wrote:
I'm waist deep in problems, and have no idea how to get up.
I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
I discovered that the program w
jicman schrieb:
Can the D1 code be easily changed to D2? We are talking about more than 30K
lines of code.
The most important change is constness.
I personally use the following compatibility "layer"; though it's aim is
to provide compatibility with both D1 and D2 compilers and not
complet
Bill Baxter wrote:
On Tue, Mar 10, 2009 at 10:45 AM, Simen Haugen wrote:
I'm waist deep in problems, and have no idea how to get up.
I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
I discovered that the program would no longer compile, and I have several
features a
Bill Baxter wrote:
On Tue, Mar 10, 2009 at 10:45 AM, Simen Haugen wrote:
I'm waist deep in problems, and have no idea how to get up.
I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
I discovered that the program would no longer compile, and I have several
features a
On Tue, Mar 10, 2009 at 10:45 AM, Simen Haugen wrote:
> I'm waist deep in problems, and have no idea how to get up.
>
> I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
> I discovered that the program would no longer compile, and I have several
> features and bugfixes l
Jarrett Billingsley wrote:
On Tue, Mar 10, 2009 at 1:45 PM, Simen Haugen wrote:
I'm waist deep in problems, and have no idea how to get up.
I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
I discovered that the program would no longer compile, and I have several
fea
On Tue, Mar 10, 2009 at 1:45 PM, Simen Haugen wrote:
> I'm waist deep in problems, and have no idea how to get up.
>
> I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time ago
> I discovered that the program would no longer compile, and I have several
> features and bugfixes lo
I'm waist deep in problems, and have no idea how to get up.
I have a program that uses d1, dmd, tango, ddbi, dwt and dwin. Some time
ago I discovered that the program would no longer compile, and I have
several features and bugfixes long overdue.
It seems the problem happens during linking, b
On Mon, 09 Mar 2009 23:00:50 -0400, Chris Nicholson-Sauls wrote:
Sergey Kovrov wrote:
On 3/9/2009 8:50 PM, Chris Nicholson-Sauls wrote:
While not strictly intuitive, you could do this:
auto var = Rebindable!(const Foo)(new Foo);
assert(var.opDot !is null);
As 'opDot' returns the wrapped objec
On Tue, 10 Mar 2009 11:15:36 -0400, Sean Kelly
wrote:
Steven Schveighoffer wrote:
On Mon, 09 Mar 2009 17:55:48 -0400, jicman wrote:
How much different is D2 vs. D1?
Much. Much much much ;) It's almost another language.
But most of the differences aren't breaking changes. You'll enco
Steven Schveighoffer wrote:
On Mon, 09 Mar 2009 17:55:48 -0400, jicman wrote:
How much different is D2 vs. D1?
Much. Much much much ;) It's almost another language.
But most of the differences aren't breaking changes. You'll encounter
some problems with string literals because of the ne
16 matches
Mail list logo