Thoughts on Whatnot
A blog about .
Feedback for Go 2 Design Drafts
Recently, draft design documents were released by the Go development team detailing what the members of the team have been thinking about and researching for the development of features for Go 2. Specifically, these cover potential plans for error handling, changes to error values themselves, and generics. While I haven’t gotten a chance to read through the documents on error values yet, I have read the sections on error handling and generics.
More...
Awaiting Return
Introduction Recently, I’ve found myself doing a lot of work with Node.js for various different reasons. As it’s primarily UI work, one of the features I’ve had to get used to was Promises, followed quickly by async/await. I’ve never been a fan of this model, but the Node approach to it seems far cleaner than earlier attempts that I had used, such as C#’s. Overall, I like the approach, although its complete lack of support by Node’s standard library, and especially by EventEmitter, is extremely awkward.
More...
Introducing WDTE
This last semester, I took a class on compiler design. Towards the end of the semester, I suddenly realized that something I’d been mildly interested in working on for a while was in fact quite a bit easier than I had originally expected: Writing my own scripting language. I began work on it and had a working prototype in just a week or two. I worked on it pretty much non-stop for a bit, and I had originally intended to write this introduction back a few months ago, but some stuff came up and I was busy and… Either way, here it is.
More...
The Problem with Interfaces
In a recent talk, Russ Cox asked Go developers to write about problems they’ve run into with Go in an attempt to help steer the design process for Go 2. In this post, I would like to attempt to do so by explaining some of the issues I have with Go’s interfaces. To start with, I think it’s best if I explain the problem I think that Go’s interfaces solve before explaining where I think they fail.
More...
Signage
I would like to take this opportunity to announce Signage. I recently (Yesterday, actually.) stumbled accross the White House’s signed legislation list. I thought it was neat, but I was quite disappointed to find that it doesn’t seem to have an RSS feed. So I wrote one. Signage is in two parts: A package that provides a very simple API for fetching and scraping the lists of legislation from the whitehouse.
More...
Composition vs. Inheritance
There’s a situation that, while it doesn’t happen too commonly, annoys me when it does happen. Someone comes to Reddit, or golang-nuts, or somewhere else, and asks about the often repeated refrain about composition vs. inheritance. Sometimes, they get the right answer. Sometimes, someone makes some out-of-nowhere remark about embedding. The problem is that embedding is not in and of itself composition. It can be used in composition, but composition is not a syntactic or behavioral choice in the language; it’s a design pattern.
More...
Go Plugins
The release of Go 1.8 inches steadily closer, bringing with it many interesting and useful features and improvements, including shorter compilation times, an even faster GC, and, my personal favorite, initial support for plugins. Plugins, essentially Go’s version of C’s dlopen() and related functions, are an interesting one. The ability to dynamically load packages at run-time has been one of my most wanted features in Go since I first figured out how interfaces work.
More...