Two software developers discussing how humans perceive the nature of reality

You know, just two regular guys, having a conversation about the development of the human brain with regard to materialist versus idealist views of the world in the form of source code snippets…

Dan’s Proposal

One way it might work

class Brain
{
    void OnInputReceived(Input input)
    {
        // Perhaps this is pseudo-random, i.e. determinstic
        // but appears random
        switch (DecideViewOfReality())
        {
            case ViewOfReality.Materialist:
                InterpretInputFromMaterialistPerspective(input);
                break;
            case ViewOfReality.Idealist:
                InterpretInputFromIdealistPerspective(input);
                break;
            default:
                throw new InvalidViewOfRealityException();
        }
    }
    /* ...other brain functions... */
}

Another possible way

abstract class Brain
{
    protected abstract void OnInputReceived(Input input);
    /* ...other brain functions... */
}

class MaterialistBrain : Brain
{
    protected override void OnInputReceived(Input input)
    {
        // This is 100% inherent in this type of brain,
        // not at all open for discussion.
        InterpretInputFromMaterialistPerspective(input);
    }
}

class IdealistBrain : Brain
{
    protected override void OnInputReceived(Input input)
    {
        // Same as above, but with the idealist interpretation.
        InterpretInputFromIdealistPerspective(input);
    }
}

Timwi’s Proposal

public abstract class ThoughtProcess
{
    public abstract bool OnInputReceived(Input input);
}

public class Fundamentals : ThoughtProcess
{
    private List<ThoughtProcess> _abstractions = new List<ThoughtProcess>();
    public override bool OnInputReceived(Input input)
    {
        foreach (var abstraction in _abstractions)
        {
            if (abstraction.OnInputReceived(input))
                return true;
        }

        // No applicable abstraction exists yet... create one
        ThoughtProcess abstraction;
        if (FeelsLikeMaterialist())
            abstraction = new MaterialistThoughtProcess();
        else
            abstraction = new IdealistThoughtProcess();
        _abstractions.Add(abstraction);
        return abstraction.OnInputReceived(input);
    }
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: