March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | On Tue, 11 Mar 2014 17:35:20 -0400, Brad Anderson <eco@gnuk.net> wrote: > On Tuesday, 11 March 2014 at 18:35:57 UTC, Dicebot wrote: >> Not in 2.065 >> 2.066 will introduce "virtual" keyword >> 2.067+ will change the defaults if it will still be considered good idea > > Have a link to where that was decided? I was under the impression that virtual was accepted as a compromise so people could just stick "final:" at the top of their classes have have something acceptably close to final-by-default. I can't remember if I actually managed to keep up with that behemoth of a thread though. It was buried in that thread. Here is a bugzilla issue that links to Walter's post. I wasn't aware until recently. Re-reading the thread where Walter agreed, I can't find a clear response from Andrei that he was in agreement or not, but I suspect not (especially after reading his responses here). https://d.puremagic.com/issues/show_bug.cgi?id=11616 Perhaps the feature should be put on hold for now? Haven't heard Walter re-affirm his position. -Steve |
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | On Tue, 11 Mar 2014 17:35:20 -0400, Brad Anderson <eco@gnuk.net> wrote:
> Have a link to where that was decided? I was under the impression that virtual was accepted as a compromise so people could just stick "final:" at the top of their classes have have something acceptably close to final-by-default. I can't remember if I actually managed to keep up with that behemoth of a thread though.
BTW, I'm somewhat amused that this was as unknown to everyone else as it was to me. I figured because I was away from D for 6 months, I just missed it and everyone was OK with it :) Didn't mean to start another firestorm!
-Steve
|
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | Brad Anderson:
> Have a link to where that was decided? I was under the impression that virtual was accepted as a compromise so people could just stick "final:" at the top of their classes have have something acceptably close to final-by-default.
I have seen D code in the wild where all member functions are virtual, impure and most variables are mutable. Programmers often stick to defaults, even when they are not the best choice. Virtual functions are functions with some extra functionality. When the programmer needs it, he/she/shi asks for it. When it's not needed, the programmer often sticks with what defaults the language designers have chosen.
Bye,
bearophile
|
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Tuesday, 11 March 2014 at 21:35:12 UTC, Ola Fosheim Grøstad wrote:
> On Tuesday, 11 March 2014 at 21:29:00 UTC, Dicebot wrote:
>> final: // want all to be final by default
>>
>> // ...
>>
>> virtual void foo() {} // but this one function
>
> Doesn't this make room for undetected bugs?
>
> Generally the syntax should have enough redundancy to prevent a single typo (missing ":") from completely changing the semantics.
>
> Ola.
Mostly depends on the way you format the code. It is perfectly consistent with existing @safe / @system interaction though and allows to define defaults in user code without changing anything in the language ;)
|
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Tuesday, 11 March 2014 at 21:46:05 UTC, Steven Schveighoffer wrote:
> It was buried in that thread. Here is a bugzilla issue that links to Walter's post. I wasn't aware until recently. Re-reading the thread where Walter agreed, I can't find a clear response from Andrei that he was in agreement or not, but I suspect not (especially after reading his responses here).
>
> https://d.puremagic.com/issues/show_bug.cgi?id=11616
>
> Perhaps the feature should be put on hold for now? Haven't heard Walter re-affirm his position.
>
> -Steve
There is also actual pull request (which I can't link right now because github is down for me).
What I have listed is summary of plans from that bugzilla entry and PR at point where Walter has agreed. Recently Andrei has noticed merged PR and objected to it so what will happen next is unclear.
|
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | PR: https://github.com/D-Programming-Language/dmd/pull/2895 |
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Tuesday, 11 March 2014 at 21:47:19 UTC, Steven Schveighoffer wrote:
> BTW, I'm somewhat amused that this was as unknown to everyone else as it was to me. I figured because I was away from D for 6 months, I just missed it and everyone was OK with it :) Didn't mean to start another firestorm!
>
> -Steve
I only know it because I am subscribed to all activity in dmd repo :)
|
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On 3/11/2014 2:42 PM, Steve Teale wrote: > > Well if we're going there, we should go the whole hog and have final, > direct, and virtual. Pardon my ignorance: What's 'direct'? > It's a system programming language, so you should > be able to walk down the street naked as long as you are prepared to put > up with the consequences. There has been much debate in the programming community over what exactly "system programming language" means. I think you, sir, have found the winner! Gets my vote, anyway! :) |
March 11, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Michel Fortin | On 3/11/14, 2:28 PM, Michel Fortin wrote:
> On 2014-03-11 21:16:28 +0000, Andrei Alexandrescu
> <SeeWebsiteForEmail@erdani.org> said:
>
>> On 3/11/14, 1:45 PM, John Colvin wrote:
>>> You do support the introduction of the virtual keyword though, yes?
>>
>> If explained a good use case, I would.
>
> class Foo
> {
> final:
> void bar();
> void baz();
>
> virtual:
> void crack();
> void crunch();
>
> final:
> void dodge();
> void damp();
> virtual void divert();
> void doh();
> }
Got it, thanks. If we don't move forward with final by default, this is too little utility to justify adding a keyword. (We could look into making it a contextual keyword.)
Andrei
|
March 12, 2014 Re: Broken? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | On Tuesday, 11 March 2014 at 17:47:56 UTC, Steve Teale wrote:
> What D needs at this point is a dictator. There are about 30 pages of discussion about Walter's std.array.front post, and Steve S's counter post.
>
> It reminds me of the way it was maybe 4 years ago, when there was so much bickering that I just gave up for some time, and went away. Who is going to go through all that stuff, and winnow a compromise out of it. Everyone has a job, or some vital preoccupation with their own project.
>
> The buck has to stop somewhere - is it Walter, or Andrei, or can any proposal or comment be stalled by sheer weight of contrary views?
>
> This is probably a management issue, not a technical one. Trouble is there's no manager, and even if their was, he'd have no minions.
>
> What to do?
>
> Steve
I started trying to use D a few years ago and also had to take a long hiatus due to frustration with its quality of implementation. But having come back to it a little over a year ago I think it is now generally useable and ready for the final polishing effort needed to make it into a professional product. A lot of that success I feel is due to the good leadership of Walter and Andrei. Even though they are the "dictators" so to speak of the language, they are very open to discussion and have good taste when it comes to what to include in the language. I learn a lot from the forums and appreciate being able to discuss things with those involved in developing the language.
Still something needs to happen to get D to the next million people. The current grassroots structure has served D well. And I think its legacy should continue forward no matter what form D's development takes. But along with its current set of developers I think that D really needs some solid financial support. In particular, I think that there needs to be a good group of full-time developers on the payroll to kick its development into high gear. I have no ability to organize such an effort, pay for it, or even join as a developer. But whatever could be done to get funded development into action would be well worth it in my opinion. I fear that without such an organized effort the promise that D currently holds may fade into niche irrelevance as time passes on.
When I saw the talks scheduled for Dconf 2014 "Opening Keynote: State of the struct address" by Andrei and "Keynote: The Last Thing D Needs" by Scott Meyers I was hoping that perhaps this will be announced as something already in the works. Not sure what that conference will bring. But would be pretty cool if so.
Joseph
|
Copyright © 1999-2021 by the D Language Foundation