-
Go Interfaces
One of the interesting aspects of the Go language is interface objects. In Go, the word interface is overloaded to mean several different things. Every type has an interface, which is the set of methods defined for that type. This bit of code defines a struct type S with one field, and defines two methods…
-
Go Channels
Since the first thing I liked about Go is channels, I’ll talk some more about them. IA channel can transmit a value of a specific type. That is, a channel value of type chan T can transmit any value of type T. This is not much of a restriction, as the type interface {} can…
-
Go
I heard about the Go programming language in May 2008 and was immediately interested. I spent a couple of weeks writing a preliminary gcc frontend for Go. I’ve been working on it ever since, with just a few interruptions here and there. It’s a relief that this work is finally out there. Both the language…
-
Insurance
Insurance works if You have a sufficiently large population of people at risk of some loss. Otherwise, the insurance company can’t get started, since it can’t earn enough in fees to pay off the loss when it happens. The loss is large enough that most people are unable or unwilling to take a chance on…
-
Compiler to Assembler
The gcc compiler has always worked by writing out assembly code in text format. The assembler reads this text file to produce an object file. Most compilers work this way, although there have been some exceptions such as the MIPS compiler used on Irix. Clearly this process of producing text and then parsing it again…