4 ms·
I honestly have mixed feelings about this. It is a really nice showcase of what the standard library can do (walking the AST and modifying it) with little amoun
by metafex 12y ago
I honestly have mixed feelings about this. It is a really nice showcase of what the standard library can do (walking the AST and modifying it) with little amount of code.
OTOH it would be better to not make this a web-service. As much as it may seem to be convenient, integrating it with "go generate" (when it's ready) would probably be easier to use and not pose any security risks ;)
- jerf 12y agoSince go generate isn't out yet and the web service can work now, it's a good prototype of what can be done. Obviously once go generate is official anybody could do something like this themselves, even if this particular implementation is never ported.
- bouk 12y agoI agree the web-service is a terrible idea, I just wanted to see if I could implement it. It's also super insecure, as go fetches the package over HTTP (which you can see when you do go get -x gonerics.io/d/graph/string.git)
- barrkel 12y agoActually, I think the web service is the only interesting part of the idea. Generics via string substitution are as old as the hills, I remember doing the same thing for Pascal 20 years ago. (The factual accuracy of the statement that it was 20 years ago disturbs me. I'm getting old!)
- crazychrome 12y ago100% agree. it's a break through not because of the problem it's trying to solve, but the approach.