The Death of D1. (Was Tango vs Phobos)

superdan super at dan.org
Tue Aug 26 12:09:47 PDT 2008


Sean Kelly Wrote:

> superdan wrote:
> > enum ain't a problem. get over urself already.
> 
> My problem isn't with the concept, it's with the word.  That's why I 
> said it's a "barn door" issue.  To me, the meaning of 'enum' is 
> "enumerated type."  It has nothing to do with declaring manifest 
> constants. 

guess u have to retake the driving test then. enumerated type means: i enumerate this type's possible values. they are necessarily constants. and since they are there they are manifest. viola. da gamba.

> That's why I also think that anonymous enums should be 
> illegal.

then anonymous classes should be illegal too?

>  Just give us a new label for this stuff ("manifest" was 
> proposed).

talkin' about that long view of yers. imagine teaching kids. hey-hey, kids. today we do constant definitions. well, we sure aren't lackin'em. the more the merrier.

const a = 1;
invariant a = 1;
enum { a = 1 }
manifest a = 1;

kid #1: teacher, what's the diff between const and invariant?
teacher: in this case none.
kid #2: how about enum and invariant?
teacher: in all cases none.
kid #3: why both const and invariant?
teacher: they have different meanings as we talked yesterday in the megacore class.
kid #4: but why both enum and manifest if they're always the same thing?
teacher: oops, bell's ringin'. don't forget the homework for tomorrow: implement opIndex in o(n).

>  Or heck, make constants not addressable and eliminate 
> storage for the altogether.

that ruins everything about const.

>  I can't think of a single instance in my 
> time as a programmer where I actually wanted to take the address of a 
> constant.  What's the point?  You can't modify it anyway.

taking a slice off a const string.

> >>  > i know i switched to d2 as soon as it was out. i have nuff freedom @
> >>  > work to write at least part of my code in whatever. the more versions
> >>  > arrive with new stuff the more d1 looks to me like an ass-backwards
> >>  > neanderthal tool made of sticks bear claws and silex. could even go as
> >>  > far as sayin' d1 ain't ever gonna make it to prime time. it's just a
> >>  > cute lil language that has a few merits marred by its issues. all
> >>> languages  are like that. d2... d2 feels different because it is
> >>  > different. larger ambitions to address real problems in innovative
> >>> ways.  and leave no shit behind like most languages do
> >>  > in pursuit of the mother of all features.
> >>  > and the new team has much more knowledge than walt alone. (sorry
> >>  > walt. but i guess u'd agree.)
> >>
> >> Yeah, D1 is a cute little language, but it's eminently usable.  All D2 
> >> really has going for it at the moment is the const stuff, and I quite 
> >> honestly don't care about that.
> > 
> > you gotta be intercoursin' kiddin' me. hellooo. concepts. i came to the point where i call bullsolidwaste on unconstrained templates. all templates should be constrained. also destructors and the postblit business. now i can have automatic cleanup like in c++. better yet there's gc so i dun need to clean up a lot of stuff. only files'n stuff.
> 
> Concepts can be done in D1 as well.  The D2 stuff is just syntactic 
> sugar for:
> 
>      void fn(T, bool cond : true = SomeTest!(T))( T val ) {}
> 
> I've been doing this sort of thing in Tango forever.  That isn't to say 
> that I don't want real concept support--I totally do--it just isn't 
> worth some of the other baggage in D2 right now.

see here's some fud again.

>  Tell you the truth, 
> what I probably want most from D2 is overload sets.  Function 
> overloading in D1 just plain sucks and is a constant annoyance for me. 
> Fixing this alone is enough to make me put up with a lot of other stuff 
> I don't like.  But on the flip side I can't actually use it yet because 
> Tango has to work on D1 as well.

overload sets are cool. guess if i were a shrink i'd say ur beef with d2 is that u have this tango/d1 worry hangin' over ya.

> > guess someone's not keepin' with'em news.
> 
> Nah.  I only care about features I can't fake in D1 already.
> 
> >>  This isn't because I don't work on 
> >> projects large enough to require it--my last project was a few million 
> >> lines of C++ maintained by a decent sized team--but rather because I 
> >> feel that inelegant syntax is a greater issue for maintenance than 
> >> language support for data mutability.  I'd simply rather have nothing 
> >> than something that I think will produce unmaintainable code.
> >>
> >>> so sean. how much d2 did you write. hope you agree it's hard to claim it has no practical advantages if you haven't practically used it. the irony, eh.
> >> Not enough to speak with experience, quite honestly.  Perhaps that will 
> >> chance with this shared runtime business.
> > 
> > then quite honestly ur naysayin' is tenuous.
> 
> I said at the start that it's my current opinion and may change, so 
> yeah, it's totally tenuous.

cool. then guess u can help it.



More information about the Digitalmars-d mailing list