Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Gay OO argh

Name: Anonymous 2009-11-11 7:03

I suppose I better learn one of them gay OO business oriented to be able to code inane custom apps for some corporate...

I come from the C demoscene school, so using OO and especially using stuff like .NET or JVM to me is like pulling my eyes out with a spoon; but the world changes nobody cares about pure performance anymore it seems. I gotta go with the flow...

So, which is the lesser of two evils for someone like me?
C# or Java?
(or any other you might suggest)

Name: Anonymous 2009-11-12 17:54

>>41
Use a modern systems language fer chrissake.

package main

import "bufio"
import "os"

const errorPrefix = "\033[41m\033[37m\033[1m\033[5mCRITICAL FAILURE: "
const errorSuffix = "\033[m\n"

func reportError(err os.Error) {
    os.Stderr.WriteString(errorPrefix + err.String() + errorSuffix)
}

func main() {
    f, err := os.Open("asd", os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0666);
    if err != nil {
        goto fail    // the mighty gofumpt insists this is a 3-line block
    }
    s := bufio.NewWriter(f);
    // no need to worry about out-of-memory,
    // since Go unconditionally crashes in that case.
    err = s.WriteString("blah");
    if err != nil {
        goto fail
    }
    err = s.Flush();
    if err != nil {
        goto fail
    }
    return;
fail:
    reportError(err);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List