More D newb questions.

Me Here p9e883002 at sneakemail.com
Thu May 8 02:39:15 PDT 2008


Janice Caron wrote:

> 
> By giving a compile error, of course. That's how it's supposed to
> work. It's telling you to fix your code, e.g. to
> 
>         void main() {
>             char[] a = ['a'], b = ['b'];
>             writefln( a ~ b );
>         }

That's like saying a car is "working", so long as it displays a red light on
the dashboard to tell you that it isn't. If real world situations were always
defined in terms of compile time constants life, would be much easier. Indeed,
we'd never need to run the program because the compiler would solve it a
compile time, and could just print out the 'answer', instead of all that nasty
messing with relocatable object files.

There are four discussions in this thread:

1. How to solve my original problem - Closed.

2. How to solve my original problem efficiently - Open.

3. Can type systems handle the 'natural' extension of 
	T[] ~ T[] -> T[]; 
	T[] ~ T   -> T[]; 
	T   ~ T[] -> T[]; 
	T   ~ T   -> T[];
    Closed. (Yes).

4. Can D's type system handle this - Open.
   I think it could, and if it can't it should,
   but I don't know enough of the internals
   to be able to say for sure.

5. Should D allow it. 
	Closed. (The man from D'elmonte, he say: No)

b.
-- 




More information about the Digitalmars-d mailing list