February 10, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | Vladimir Panteleev <thecybershadow@gmail.com> wrote: > On Sun, 10 Feb 2008 14:47:00 +0200, bearophile <bearophileHUGS@lycos.com> wrote: > >> Wax was developed for Python, that has named arguments too, so that Python code may look like: >> >> tb = TextBox(parent, size=(400, 200), multiline=1, readonly=0, wrap=1, justify='left') > > D isn't too far off with "with" statements. Example DFL code: > with(tb = new TextBox) { bounds = Rect(100, 100, 200, 200); multiline = true; readOnly = false; wordWrap = true; parent = this; } Now if only you could declare a new variable within a with statement. It's not strictly necessary, but I find with (auto tb = new TextBox()) { ... } to be more aesthetically pleasing than auto tb = new TextBox(); with (tb) { ... } of course, given that with introduces a separate scope, tb might go out of scope the moment the with statement exits. This might be open to interpretation though, seeing as tb is declared outside the curly braces. > And with the new full closures, you can implement event handlers inline, too. > | |||
February 10, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | Vladimir Panteleev Wrote: > D isn't too far off with "with" statements. Example DFL code: > with(tb = new TextBox) { bounds = Rect(100, 100, 200, 200); multiline = true; readOnly = false; wordWrap = true; parent = this; } This is shorter and I think it looks better, with less syntax: auto tb = TextBox(space1).size(400, 200).multiline(1).readonly(0).wrap(1).justify("left"); In D you may want to use camelCase to move your fingers a bit more: auto tb = TextBox(space1).size(400, 200).multiLine(1).readOnly(0).wrap(1).justify("left"); > And with the new full closures, you can implement event handlers inline, too. I don't use D 2.x, but I presume a good Wax-like wrapper can be written for D too :-) Bye, bearophile | |||
February 10, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Hans W. Uhlig | Hans W. Uhlig wrote: >> I have never had that problem >> and I can attest to you that my programming experience pales in >> comparison to anyone on this newsgroup. There has only ever been one >> standard library. Tango and its predecessor "Mango" was created because >> patches submitted to Phobos were not readily implemented. > > For a "supplementary library" I find it funny that its not released as a set of source files to be added to a compiler or a set of libs for version x, for version y, or version zed. Its distributed as a set of libs, compiler, linker, make & debugger. This to me smacks not only of a standard library but nearly a full fork based on said library. This has nothing to do with forking, but rather the fact that to use Tango you need to replace the parts of the DMD package that makes D tick. Of course we want people to use our library, and it will be easier for them if they can download all they need in a step less. We did go pretty please with Walter to make this happen. An additional facet of this is that every few releases of DMD, it gains a bug that breaks Tango, and by distributing the compiler ourselves, we can better minimize questions related to faulty compilers. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango | |||
February 11, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Hans W. Uhlig | Hans W. Uhlig さんは書きました: > Tyro[a.c.edwards] wrote: >> Hans W. Uhlig さんは書きました: >> I’ve ported the Mersenne Twister on two separate occasions (both original and SIMD versions) to D, and while I learned a little more about D in the process of doing so, I still do not understand a whole lot about programming. > > To write that complex an algorithm and no know much about programming you are either an idiot savant or a liar. I am many thing... but a liar is absolutely not one of them. If I'm made to conform to your prolarized concept of human knowledge and programming ability, then I will have to say I stand in the camp of idiot savants all by my lonesome. I tend to think I can simply read and follow the simple instructions provided by on the website, which in my mind take common sense, not understanding. > > The amazing thing about this is that I learned >> and did it all without any documentation other than the D website, the source code, and asking a few questions here and there. My debugger was me, my IDE was first notepad then I upgraded to UltraEdit because the job paid for it. I used the only standard library D has: Phobos. > > And my father walked up hills both ways in the snow & rocks without shoes because thats what he had. So when it came to us, he paved the road, bought us shoes and gave us a segway. Were learn a whole lot more at school now then he did. > And ofcourse if we should lose our road due to an unfortunate earthquake most of us would all sit around complaining because we've never walked over a hill in our life. Those that took the time to walk up a few hills eventhough the didn't have to would have not be hampered by this problems and would simply fall back on this experience until such time when the roads were rebuiled. >> Sorry, make that $10 since I did buy "Learn to Tango with D". The language is not that difficult to learn especially if you are a novice and have no preconceived ideas about what programming should be. > > Since this is plesant conversation, how is the book? I was looking to pick it up as a reference since there is a limit on the online material available. It is great to the point I've read. I've not yet complete reading it so I cannot give you a complete review. I'd venture to say that if they wrap things up they way they started, it will turn out to be a very good book indeed. > >> For those who come across with preconceived ideas, the site provides enough to explain differences between D and C, D and C++, D and JAVA and so on… To me, that is all you should require if you are an experienced programmer. > > Preconceived ideas, tested solutions and methods seem to be what D is sold as. 30 years of experience from all languages brought together in one tight clean package written to be easy to learn and easy to use. Or perhaps I misread Walter's sales pitch. It took those other languages 30 years to reach where they have the backing of the best marketing teams and billions of dollars in support from the largest companies outfitted with paid professionals whose job it was to develop and improve those languages. I'm sure that D will pale in comparison to those languages with regard to commercial acceptance and viability. I simply hope that people would lend a hand at fixing the problems they encounter rather than always complaining about them. > >> >> Yes, bells and whistles can make easier. But is that truly a showstopper? I don’t think so. > > Bells, whistles, the entire percussion section, and a missing lead singer could stop the show, or at least delay it. Perhaps we should let the band in, and let the understudy take the stage. > >> >> Regards, >> Andrew > > Sincerely, > Hans W. Uhlig | |||
February 11, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Tyro[a.c.edwards] | > It took those other languages 30 years to reach where they have the backing of the best marketing teams and billions of dollars in support from the largest companies outfitted with paid professionals whose job it was to develop and improve those languages. I'm sure that D will pale in comparison to those languages with regard to commercial acceptance and viability. I simply hope that people would lend a hand at fixing the problems they encounter rather than always complaining about them.
I probably fall in the camp of the complainers. I would love to lend a hand at fixing problems if only I had code I could modify, compile and test to that end.
| |||
February 11, 2008 Re: Necessities for Adoption of D | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Neil Vice | Neil Vice $B$5$s$O=q$-$^$7$?(B:
>> It took those other languages 30 years to reach where they have the backing of the best marketing teams and billions of dollars in support from the largest companies outfitted with paid professionals whose job it was to develop and improve those languages. I'm sure that D will pale in comparison to those languages with regard to commercial acceptance and viability. I simply hope that people would lend a hand at fixing the problems they encounter rather than always complaining about them.
>
> I probably fall in the camp of the complainers. I would love to lend a hand at fixing problems if only I had code I could modify, compile and test to that end.
>
>
There are a number of projects at dsource.org atrophying from a lack of attention. I'm sure you can find one there that peaks your curiosity. More than likely the developer(s) would gladly welcome the help.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply