On Wed, 09 May 2012 17:12:57 -0700, Nick Sabalausky
<[email protected]> wrote:
"Adam Wilson" <[email protected]> wrote in message
news:[email protected]...
On Wed, 09 May 2012 15:17:41 -0700, Nick Sabalausky
<[email protected]> wrote:
My take, FWIW:
1. DI is only useful for those anachronistic corporations who beleive
in
code-hiding (and even then, only the ones who release libs), which
regardless of everything else, isn't even *realistic* anyway - there's
always reverse-engineering, and with the super-popular JS there *IS NO*
pre-compiled form, and yet non-OSS companies *still* get by just fine
anyway. If you're relying on the increasingly-irrelevent practice of
code-hiding (which there is *no such thing* - only obfuscation, which
is
exactly what compiling does, it only obfuscates the source, it doesn't
hide
it), then you need to accept that there *are* going to be things you
will
*never* be able to do, period, like virtual templates (which *are*
possible
in theory if all the source is available, even if D doesn't currently
allow
it).
Anachronistic or not, MANY companies still require it. And JS is not
exactly D, they attack to very different segments. And most companies
don't put anything of intellectual value in JS. But im not hear to argue
the morality of the point. Only that the DI generation issue will stop a
lot of groups from using D.
My random ranting made it unclear, but my main point was that if a
company
requires their libs be distributed in binary-only form - for *whatever*
reason - then they MUST accept that there will be things they *can't* do.
Note that's *not* merely some policy I'm proposing that D take - it's
hard,
immutable reality.
We aren't talking about hard-binary-only form, most companies realizes
that's never going to happen. But distributing something in source form
isn't OK either. Companies ship .NET assemblies all the time, they aren't
hard-binary, nor are they the original source but an intermediate language
(although they semantically are, which has given rise to a lot of
obsfucators). Somewhat this about lawyers not technical people. The best
possible answer is to embed some kind of intermediate representation into
the library that describes the API and Implementation and can be
extracted/read by other tools. But thats a ways off.
--
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/