On Fri, Mar 11, 2016 at 6:34 AM, <
klau...@gmail.com> wrote:
> On Thursday, 10 March 2016 11:22:22 UTC+1, minux wrote:
>> 1. some environment, for example, App Engine, forbid using assembly,
>
> Could you elaborate - how is that a drawback? That is a choice that makes
> sense for the App Engine, but it doesn't really affect other platforms.
I think what Minux is trying to say is that, if package foo uses
assembly (and the author doesn't remember to use e.g. an appengine
build tag), then a Go App Engine app can't use package foo. That is
transitive - if I have a Go application that I'd like to run both on
and off App Engine, and I import package bar, which imports package
qux, which imports foo, then again, the magic of "go get" is broken.
Sure, the standard library is provided on App Engine, rather than
brung along with the app code, but it means that, if I can think of a
new feature, a bug fix, or optimization to make to flate, then I can't
simply fork the flate package and change an import path.
>> 2. make otherwise portable Go packages tied to a particular implementation
>> (the incompatibility of gc/gccgo assembly makes things worse.)
>
> gccgo is definitely currently an issue, but is there anything stopping an
> eager spirit from adding assembler support to gccgo?
It's certainly possible for an eager spirit (if one magically existed)
to either add gccgo support for Plan 9 style asm, or to port the Plan
9 style asm code to whatever asm format that GCC accepts. But apart
from the opportunity cost of that eager spirit's time, either way, we
now have more code to maintain, and as you noted, anything asm related
is riskier in general. One example is a safety bug being fixed in one
version (e.g. the gc compiler) but not another (possibly in a separate
repo), and now we're shipping vulnerable code.