> From: "Dave Whipp" <[EMAIL PROTECTED]>
> Date: Mon, 25 Nov 2002 11:35:40 -0800
>
> "Michael Lazzaro" <[EMAIL PROTECTED]> wrote:
> > [...] and a type that matches every
> > context (except void).
> 
> Actually, it might be nice to have a void type. It might seem useless:
> but then, so does /dev/null.
> 
> An example, from another language, is C++ templates. Its amazing
> how often I find myself needing to create a template specialization
> for the void type, because I cannot declare/assign-to void variables
> in C++. Even if Perl won't have templates, we still tend to be
> quite dynamic with the code (code generators, eval, etc.). The
> ability to declare a variable of type-Void could be helpful to
> avoid special casing it in the generators.

It could also behave as our bool type.  Something that you can attach
properties to but doesn't need a value seems that it could be useful
every once in a while.

Just... what does a void literal look like?  Perhaps just the word
C<void>?

    my void $false_var = void but false;

I'm just speculating.  But I do see a use for it.

Luke

Reply via email to