Smooth transition to D2 for Tango users?

Jason House jason.james.house at gmail.com
Sat Sep 20 07:18:38 PDT 2008


<posted & mailed>

Bruce Adams wrote:

> On Wed, 17 Sep 2008 18:31:02 +0400, Jason House
> <jason.james.house at gmail.com> wrote:
>
> > I'd like to see a smooth transition for Tango, not just the users! I
> > made several posts on the topic. The latest was titled "forward
> > compatibility" -- Making the D1 compiler tolerant of code that looks
> > like D2, but not adding new functionality...
> 
> The thing is what you are asking for is a major change to the D1.0 spec.
> D1.0 is frozen. Bug fixes (to the spec) are permitted but major additions
> are not. 

That means almost nothing to me.  Is the spec on how users should write
their D1 code or a spec on how compiler writers should handle D1 code?  If
it's the former, my suggestion poses no problems because old D1 code will
still compile and execute the exact same way it always did.  If it's the
latter, I don't see much of a problem since all alternative D1 compilers
base their execution on dmd's front end source code.


> Moreoever this addition does not add any functionality. So while 
> it
> may seem like a sensible thing to do from a pragmatic programmer's point
> of view
>  from a language design point of view its very silly indeed.

You're absolutely right that it depends on the point of view.  While I may
like the pragmatic programmer's point of view, I'm motivated by the library
maintainer's point of view and the library users' point of view.  

Users would want freedom to choose their D version and the libraries that
they use.  The more incompatibilities that exist, the more it splits apart
the D community.  Such splits leave a sour taste for current users and for
prospective users of D.  Users will also want to read through library code
from time to time, and the last thing they want to see is code that's
littered with preprocessor directives.

Library maintainers are left with the task of maintaining code.  They need
to have code with little or no duplication.  Library maintainers are also
users, and I bet that they were attracted to D by its elegance and
simplicity.



> You need to find a difficult way to tackle the problem.

One time difficulty or increased difficulty for all library writers and
users?  Either way, a solution needs to be found that the community at
large supports.



> * strip const's and invariants from the source in appropriate contexts

I've suggested this before too :)



> * use source code annotations specific to your Doneificator program

You mean add an unofficial D preprocessor?  IMHO, if there's a need for
this, it should be part of the D specification.



> Have a configure script which checks which versions of the compiler you
> have available.

ick.  I can guarantee there are many here who have explicitly tried to avoid
that kind of thing when coming to D.



More information about the Digitalmars-d mailing list