addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Destroy the "No Generics" Argument

Wes will go over the 

http://clipperhouse.github.io/gen/ 

project and how he uses it for his own templates

 (https://github.com/wfreeman/sortedcontainers).

Join or login to comment.

  • Ben

    This is the package that Chris was talking about for easily getting an AST out of arbitrary code without breaking your neck handling transitive imports, etc.

    (docs) https://godoc.org/code.google.com/p/go.tools/go/loader
    (code) https://code.google.com/p/go/source/browse/?repo=tools&name=default#hg%2Fgo%2Floader

    And here's the package doc for the standard library AST:

    http://golang.org/pkg/go/ast/

    1 · July 9, 2014

    • Robert M.

      This is just awesome. Gives me super high hopes for Oracle and some of the new tooling.

      July 9, 2014

  • Ben

    So two additional approaches to code generation for generics were batted around last night:
    A few calls to `gofmt -r`, probably through a semi-fancy shell script or a simple go program;
    using the `loader` package and some AST manipulations to identify generic code and instantiations and generating the needed instantiations.

    I think the former is probably simpler, and perhaps `gofmt -r` is why Rob Pike has said words to the effect of "when I do actually need to reuse some code in a generic-like way, doing it by hand doesn't get in my way."

    July 9, 2014

  • Ben

    Wes gave a focused introduction to the lack of generics in Go and the functioning of `gen` and it was a great jumping-off point for discussion.

    July 9, 2014

  • Eve

    Just a reminder that we're at Tysons (not Rosslyn). And the pizza is here!

    July 8, 2014

    • Chris H

      I'm going to wait for the storm to pass. I'll be a few minutes late.

      July 8, 2014

  • Robert M.

    How is parking at this location?

    July 6, 2014

    • Eve

      Uberoffices says: "Please park in the guest spots off of Pinnacle Drive or on the street." It may be even more lax in evenings, though--Ryan will hopefully update, but I plan to drive. If anyone needs a ride from Vienna metro or something I can swing by on my way.

      July 6, 2014

    • Ryan D.

      By the time people start showing up street parking will be plentiful. The garage will probably be pretty empty as well!

      July 8, 2014

  • Bill K.

    Yes, I'm expecting that after your talk, a jury of 12 experts in Ruby, python, C++, and Clojure will unanimously agree that Go now has generics :)

    June 11, 2014

    • Eve

      Lol.

      June 11, 2014

  • Eve

    Wow, really setting the bar high here for expectations with the title... Note that we're in a new location: Tysons vs Rosslyn uberoffices.

    June 11, 2014

    • Ryan D.

      just a touch of link bait.

      1 · June 11, 2014

20 went

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy