nothing icon indicating copy to clipboard operation
nothing copied to clipboard

Implement Zero type inhabited by no instances.

Open eulerfx opened this issue 10 years ago • 2 comments

Maybe something like:

    public class Zero
    {
        private Zero() { }

        public static T For<T>()
        {
            throw new Exception();
        }
    }

eulerfx avatar Mar 06 '15 21:03 eulerfx

Pull requests are welcome. However if you do this a Seq would also be useful.

On Fri, Mar 6, 2015 at 11:38 PM, Lev Gorodinski [email protected] wrote:

Maybe something like:

public class Zero
{
    private Zero() { }

    public static T For<T>()
    {
        throw new Exception();
    }
}

— Reply to this email directly or view it on GitHub https://github.com/gregoryyoung/nothing/issues/12.

Studying for the Turing test

gregoryyoung avatar Mar 06 '15 21:03 gregoryyoung

This type also supports the null value, see #2 . Please solve the programming language problem mentioned in that bug before adding further designs

dsyme avatar Mar 06 '15 22:03 dsyme