digitalmars.D - Slides from my ACCU Silicon Valley talk
- Andrei Alexandrescu (5/5) Dec 12 2010 Compared to the talk at Google, I changed one of the "cool things" from
- Walter Bright (2/7) Dec 12 2010 Anyone care to do the honors and post this to reddit programming?
- Simen kjaeraas (5/11) Dec 12 2010 Done.
- Gary Whatmore (3/17) Dec 12 2010 Guys, I made several sockpuppet reddit accounts to mod down the two guys...
- Andrei Alexandrescu (4/24) Dec 12 2010 I think at best we focus on providing good information. One problem with...
- bearophile (9/11) Dec 12 2010 That's worse than desiring to add some examples of D code to Wikipedia, ...
- Jonathan M Davis (7/28) Dec 12 2010 Absolutely not. I don't see what that poster thought would be gained by
- snk_kid (2/22) Dec 13 2010 That's absolutely pathetic, you're actually doing the community a disser...
- retard (20/50) Dec 13 2010 I really don't know what to say. Take a look at
- Andrej Mitrovic (2/52) Dec 13 2010
- retard (14/80) Dec 13 2010 You've misunderstood. I only wish the discussion was a bit more technica...
- lurker (2/87) Dec 13 2010
- Andrew Wiley (15/16) Dec 13 2010 I mean WeAreAllTreeBear, I mean bearophile's alter ego, go someplace els...
- Yao G. (4/102) Dec 13 2010 Oh, retard using sockpuppets. Business as usual. :)
- snk_kid (1/92) Dec 14 2010
- Nick Sabalausky (4/9) Dec 14 2010 lurker was just trolling. Like Andrew's sign indicated, best not to feed...
- lurker (2/13) Dec 14 2010 I see, now defending D is considered trolling. Something tells me this N...
- Nick Sabalausky (9/24) Dec 14 2010 (Against my better judgement, I'll respond this time...)
- Andrej Mitrovic (3/8) Dec 13 2010 You can always open up a new topic and discuss possible new features
- Andrei Alexandrescu (25/41) Dec 13 2010 Well a reddit discussion is a reddit discussion opened to all flaws of
- bearophile (16/17) Dec 14 2010 A template with two constrains makes it less handy to add error messages...
- Walter Bright (8/17) Dec 14 2010 Adding such error messages misses the point of constraints. The idea is ...
- bearophile (5/12) Dec 14 2010 If the purpose is to produce error messages if the instantiation is wron...
- Don (9/30) Dec 14 2010 Actually I think there's considerable potential for better error message...
- Jonathan M Davis (6/37) Dec 14 2010 Simply indicating that some of the templates' signatures match (or that ...
- Andrei Alexandrescu (4/35) Dec 14 2010 Yes, printing the first constraint is quite random. This should be
- Jonathan M Davis (13/32) Dec 14 2010 It could definitely serve a purpose if _all_ of the possible template
- Andrei Alexandrescu (3/22) Dec 14 2010 Yah, I was planning on writing the same response.
- biozic (7/32) Dec 14 2010 I have a question about this and some pieces of code in the standard
- Andrei Alexandrescu (6/40) Dec 14 2010 The intent is to allow other code to define functions such as e.g. "map"...
- biozic (4/49) Dec 14 2010 Yes, I understand that this is more important than the accuracy of error...
- spir (53/60) Dec 14 2010 hat=20
- spir (13/36) Dec 14 2010 =20
- Andrej Mitrovic (3/10) Dec 12 2010 Looks like someone did:
- Hemanth Kapila (7/8) Dec 12 2010 May I know the reason behind the change? Is it that you intend to pick
- Andrei Alexandrescu (6/15) Dec 12 2010 I thought since the video of my Google talk is already online, I better
- bearophile (5/7) Dec 13 2010 Do you have examples?
- Jonathan M Davis (9/19) Dec 13 2010 At the momement, pretty much none of the operator overloads in std.datet...
- bearophile (5/7) Dec 13 2010 Are complex types totally replaced, or is the complex literals syntax (l...
- Andrei Alexandrescu (4/9) Dec 13 2010 Walter wants to keep complex literals. I strongly believe they are
- bearophile (7/8) Dec 13 2010 Thank you for your answer. So far I have used D complex numbers only two...
- Lars T. Kyllingstad (8/21) Dec 14 2010 I agree with this. It would be interesting to know how often people
- Andrei Alexandrescu (6/26) Dec 14 2010 I asked people at a seminar during a recess: "How many remarkable
- bearophile (4/7) Dec 14 2010 Instead of asking that question, I suggest to ask people that write code...
- Andrei Alexandrescu (5/15) Dec 14 2010 Magic constants have issues - be they strings, integrals, or doubles. I
- bearophile (7/10) Dec 14 2010 I don't understand what you mean.
- spir (50/54) Dec 14 2010 =20
- Don (4/27) Dec 14 2010 Agreed. I've just looked through some code that I thought used them
- Alex_Dovhal (9/12) Dec 14 2010 So if D removes complex literals what the proposed name for Imaginary O...
- Alex_Dovhal (1/1) Dec 14 2010 Oh sorry those @i and @j also would be build in. Ignore this.
- Simen kjaeraas (5/19) Dec 14 2010 With D supporting Unicode, it should clearly be =E2=84=91.
- Don (2/16) Dec 15 2010 Complex(9.998f, 2.72e-2f)
- Lars T. Kyllingstad (6/23) Dec 15 2010 And if someone *really* wants to put the "i" in there, they can just
- spir (7/12) Dec 15 2010 +++
- Ellery Newcomer (2/7) Dec 15 2010 or Complex!"0.998 + 2.72e-2i"
- Alex_Dovhal (2/7) Dec 15 2010 Looks very nice.
- so (12/33) Dec 14 2010 My first and only proposal to this newsgroup was about literals.
Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdf Andrei
Dec 12 2010
Andrei Alexandrescu wrote:Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 12 2010
Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/andrei_alexandrescus_talk_at_accu_silicon_valley/ -- SimenCompared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 12 2010
Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Guys, I made several sockpuppet reddit accounts to mod down the two guys criticising this thread. I recommend everyone to help us improve D's publicity by ignoring these trolls and voting them down. It has worked before, too -- reddit seems to fold the subthreads that get too many negative votes. This makes it look much better than it is. - G.W.Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/andrei_alexandrescus_talk_at_accu_silicon_valley/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 12 2010
On 12/12/10 8:56 PM, Gary Whatmore wrote:Simen kjaeraas Wrote:I think at best we focus on providing good information. One problem with nay-saying is that, when half-competent, provides misinformation. AndreiWalter Bright<newshound2 digitalmars.com> wrote:Guys, I made several sockpuppet reddit accounts to mod down the two guys criticising this thread. I recommend everyone to help us improve D's publicity by ignoring these trolls and voting them down. It has worked before, too -- reddit seems to fold the subthreads that get too many negative votes. This makes it look much better than it is.Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/andrei_alexandrescus_talk_at_accu_silicon_valley/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 12 2010
I was away for few days and then partially busy for several more days, I am sorry and I will try to get up to date. Gary Whatmore:Guys, I made several sockpuppet reddit accounts to mod down the two guys criticising this thread.<That's worse than desiring to add some examples of D code to Wikipedia, I was criticized about :-) ------------------- One of the comments of the Reddit thread seems a bit interesting: nullc:When I first read about D I was hoping that they'd limit overloads to pure functions, a substantial decrease in the maximum riskyness/surprise-factor of an overload hidden operation.<Is requiring the Operator Overloading member functions to be pure a good idea? Bye, bearophile
Dec 12 2010
On Sunday 12 December 2010 23:20:36 bearophile wrote:I was away for few days and then partially busy for several more days, I am sorry and I will try to get up to date. Gary Whatmore:Absolutely not. I don't see what that poster thought would be gained by enforcing that, but it's _really_ easy to have useful and legitimate overloaded operators which can't be pure. Purity has its uses, but I think that that poster is overestimating them if they think that requiring overloaded operators to be pure would be generally useful, let alone solve much in the way of problems. - Jonathan M DavisGuys, I made several sockpuppet reddit accounts to mod down the two guys criticising this thread.<That's worse than desiring to add some examples of D code to Wikipedia, I was criticized about :-) ------------------- One of the comments of the Reddit thread seems a bit interesting: nullc:When I first read about D I was hoping that they'd limit overloads to pure functions, a substantial decrease in the maximum riskyness/surprise-factor of an overload hidden operation.<Is requiring the Operator Overloading member functions to be pure a good idea?
Dec 12 2010
Gary Whatmore Wrote:Simen kjaeraas Wrote:That's absolutely pathetic, you're actually doing the community a disservice.Walter Bright <newshound2 digitalmars.com> wrote:Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/andrei_alexandrescus_talk_at_accu_silicon_valley/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 13 2010
Mon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:andrei_alexandrescus_talk_at_accu_silicon_valley/Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?I really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than the combined effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.
Dec 13 2010
Why do /you/ take it personally? On 12/14/10, retard <re tard.com.invalid> wrote:Mon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:andrei_alexandrescus_talk_at_accu_silicon_valley/Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?I really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than the combined effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.
Dec 13 2010
Tue, 14 Dec 2010 02:56:45 +0100, Andrej Mitrovic wrote:Why do /you/ take it personally?You've misunderstood. I only wish the discussion was a bit more technical and had less to do with opinions and hype. The reason is, a more technical approach might solve technical problems in more efficient way. But my goal is not to belittle social issues wrt language adoption. Surely I understand reddit isn't lambda-the-ultimate.org and I'm glad that the Go trolls didn't find the thread (yet). I just find this behavior incomprehensible. My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D. I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become.On 12/14/10, retard <re tard.com.invalid> wrote:Mon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:andrei_alexandrescus_talk_at_accu_silicon_valley/Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?I really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than the combined effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.
Dec 13 2010
Why don't you retard, I mean eternium, I mean iLikeCakes, I mean snk_kid, I mean WeAreAllTreeBear, I mean bearophile's alter ego, go someplace else. Waisting time here is really not worth it. They provide psychiatric treatment in hospitals. I can't prove this conspiracy easily, but I also voted down your stupid remarks there. I hope this teaches you a lesson. retard Wrote:Tue, 14 Dec 2010 02:56:45 +0100, Andrej Mitrovic wrote:Why do /you/ take it personally?You've misunderstood. I only wish the discussion was a bit more technical and had less to do with opinions and hype. The reason is, a more technical approach might solve technical problems in more efficient way. But my goal is not to belittle social issues wrt language adoption. Surely I understand reddit isn't lambda-the-ultimate.org and I'm glad that the Go trolls didn't find the thread (yet). I just find this behavior incomprehensible. My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D. I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become.On 12/14/10, retard <re tard.com.invalid> wrote:Mon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:andrei_alexandrescus_talk_at_accu_silicon_valley/Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?I really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than the combined effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.
Dec 13 2010
On Mon, Dec 13, 2010 at 8:50 PM, lurker <lurk lurk.net> wrote:Why don't you retard, I mean eternium, I mean iLikeCakes, I mean snk_kid,I mean WeAreAllTreeBear, I mean bearophile's alter ego, go someplace else. Waisting time here is really not worth it. They provide psychiatric treatment in hospitals. I can't prove this conspiracy easily, but I also voted down your stupid remarks there. I hope this teaches you a lesson. +----------+ | PLEASE | | DO NOT | | FEED THE | | TROLLS | +----------+ | | | | .\|.||/.. Also, it's spelled "wasting."
Dec 13 2010
On Mon, 13 Dec 2010 20:50:43 -0600, lurker <lurk lurk.net> wrote:Why don't you retard, I mean eternium, I mean iLikeCakes, I mean snk_kid, I mean WeAreAllTreeBear, I mean bearophile's alter ego, go someplace else. Waisting time here is really not worth it. They provide psychiatric treatment in hospitals. I can't prove this conspiracy easily, but I also voted down your stupid remarks there. I hope this teaches you a lesson. retard Wrote:Oh, retard using sockpuppets. Business as usual. :) -- Yao G.Tue, 14 Dec 2010 02:56:45 +0100, Andrej Mitrovic wrote:Why do /you/ take it personally?You've misunderstood. I only wish the discussion was a bit more technical and had less to do with opinions and hype. The reason is, a more technical approach might solve technical problems in more efficient way. But my goal is not to belittle social issues wrt language adoption. Surely I understand reddit isn't lambda-the-ultimate.org and I'm glad that the Go trolls didn't find the thread (yet). I just find this behavior incomprehensible. My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D. I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become.On 12/14/10, retard <re tard.com.invalid> wrote:toMon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manageprogramming?talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to redditdown.andrei_alexandrescus_talk_at_accu_silicon_valley/Done. http://www.reddit.com/r/programming/comments/eklq0/Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting themcombinedI really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than theIt has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.
Dec 13 2010
None of those usernames are mine except this one (snk_kid). You need to stop making assumptions and nobody really cares about a comment voting system. You come off as a child making such an unprofessional post in a public mailing list of a programming language. Is this what the D community is about? I've never seen anything like it before, its pathetic.lurker Wrote:Why don't you retard, I mean eternium, I mean iLikeCakes, I mean snk_kid, I mean WeAreAllTreeBear, I mean bearophile's alter ego, go someplace else. Waisting time here is really not worth it. They provide psychiatric treatment in hospitals. I can't prove this conspiracy easily, but I also voted down your stupid remarks there. I hope this teaches you a lesson. retard Wrote:Tue, 14 Dec 2010 02:56:45 +0100, Andrej Mitrovic wrote:Why do /you/ take it personally?You've misunderstood. I only wish the discussion was a bit more technical and had less to do with opinions and hype. The reason is, a more technical approach might solve technical problems in more efficient way. But my goal is not to belittle social issues wrt language adoption. Surely I understand reddit isn't lambda-the-ultimate.org and I'm glad that the Go trolls didn't find the thread (yet). I just find this behavior incomprehensible. My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D. I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become.On 12/14/10, retard <re tard.com.invalid> wrote:Mon, 13 Dec 2010 14:44:36 -0500, snk_kid wrote:Gary Whatmore Wrote:andrei_alexandrescus_talk_at_accu_silicon_valley/Simen kjaeraas Wrote:Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Done. http://www.reddit.com/r/programming/comments/eklq0/Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?I really don't know what to say. Take a look at 0 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18swbi or -1 points: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18sz8n These say nothing against D. Why does one take them personally? They are both also highly informative. As far as I can tell, these two comments go much deeper in operator semantics theory than the combined effort of 68 other threads by Walter, Andrei et al. For example the precedence of operators can get problematic when using several libraries from various vendors. Then you have: http://www.reddit.com/r/programming/comments/eklq0/ andrei_alexandrescus_talk_at_accu_silicon_valley/c18t1d5 "I really like D (2.0) and I wish it would take off." 7 points? WTF? What is the value of this reply? It's a purely subjective opinion and doesn't necessarily even beg for further discussion.Guys, I made several sockpuppet reddit accounts to mod down the two guys >criticising this thread. I recommend everyone to help us improve D's publicity by >ignoring these trolls and voting them down. It has worked before, too -- reddit >seems to fold the subthreads that get too many negative votes. This makes it >look much better than it is. - G.W.That's absolutely pathetic, you're actually doing the community a disservice.
Dec 14 2010
"snk_kid" <letrevio guerrillamailblock.com> wrote in message news:ie8gst$tta$1 digitalmars.com...None of those usernames are mine except this one (snk_kid). You need to stop making assumptions and nobody really cares about a comment voting system. You come off as a child making such an unprofessional post in a public mailing list of a programming language. Is this what the D community is about? I've never seen anything like it before, its pathetic.lurker was just trolling. Like Andrew's sign indicated, best not to feed them.
Dec 14 2010
Nick Sabalausky Wrote:"snk_kid" <letrevio guerrillamailblock.com> wrote in message news:ie8gst$tta$1 digitalmars.com...I see, now defending D is considered trolling. Something tells me this Nick is actually snc_kid.None of those usernames are mine except this one (snk_kid). You need to stop making assumptions and nobody really cares about a comment voting system. You come off as a child making such an unprofessional post in a public mailing list of a programming language. Is this what the D community is about? I've never seen anything like it before, its pathetic.lurker was just trolling. Like Andrew's sign indicated, best not to feed them.
Dec 14 2010
"lurker" <lurk lurk.net> wrote in message news:ie8r60$276r$1 digitalmars.com...Nick Sabalausky Wrote:(Against my better judgement, I'll respond this time...) 1. Since when do personal flames and random baseless accusations count as "defending D"? 2. If you're convinced I'm snc_kid, go ahead and call my bluff: dig into IPs, logs, whatever, and present your evidence. We've had sockpuppet trolls here before who were easily proved to be the same person. If I'm one, put me in my place."snk_kid" <letrevio guerrillamailblock.com> wrote in message news:ie8gst$tta$1 digitalmars.com...I see, now defending D is considered trolling. Something tells me this Nick is actually snc_kid.None of those usernames are mine except this one (snk_kid). You need to stop making assumptions and nobody really cares about a comment voting system. You come off as a child making such an unprofessional post in a public mailing list of a programming language. Is this what the D community is about? I've never seen anything like it before, its pathetic.lurker was just trolling. Like Andrew's sign indicated, best not to feed them.
Dec 14 2010
On 12/14/10, retard <re tard.com.invalid> wrote:My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D. I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more.You can always open up a new topic and discuss possible new features and/or changes for D.
Dec 13 2010
On 12/13/10 8:30 PM, retard wrote:Tue, 14 Dec 2010 02:56:45 +0100, Andrej Mitrovic wrote:Well a reddit discussion is a reddit discussion opened to all flaws of reddit's voting system. No need to get annoyed over it. I enjoy reading snc_kid's posts, clearly knows the book. If anything I'd want snc_kid to hang out more around here and provide good criticism. Generally I'd much wish D's naysayers were simply of better quality; the likes of iLiekCaeks and eternium are just not all that competent.Why do /you/ take it personally?You've misunderstood. I only wish the discussion was a bit more technical and had less to do with opinions and hype. The reason is, a more technical approach might solve technical problems in more efficient way. But my goal is not to belittle social issues wrt language adoption. Surely I understand reddit isn't lambda-the-ultimate.org and I'm glad that the Go trolls didn't find the thread (yet). I just find this behavior incomprehensible.My personal stance on this matter is that I believe a more consistent and flexible mechanism for operators would fit D.That would be interesting. In the best-case scenario, what do you think would be the positive impact of the flexible operators, as you envision them, on the language?I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become.In all honesty, it is difficult to infer your vision from the trail of your posts. As of C++ concepts, let me mention a few facts fresh from the source (I literally collected them an hour ago). C++ concepts are dead, buried, and decomposing. Nobody is working on them and there is exactly one guy in the world still talking about them. For a variety of theoretical and practical purposes, they will never make it in C++. D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner. I'm not saying you can't convince that C++-style concepts would be superior. I'm saying you'll need to bring some solid evidence to the table. If you don't, please don't claim you're being ostracized :o). Andrei
Dec 13 2010
Andrei:D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed: template Foo(T) if (Pred1!T && Pred2!T) { ... } An alternative syntax (same semantics) similar to a (static) precondition Contract gives more space for error messages: template Foo(T) static in { static assert(Pred1!T, "err msg 1"); static assert(Pred2!T, "err msg 2"); } body { ... } Function templates too may have the optional static precondition, before the optional (run time) precondition. Bye, bearophile
Dec 14 2010
bearophile wrote:Andrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
Walter:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong.You are right, I miss things all the time :-) Thank you for your patience.If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.If the purpose is to produce error messages if the instantiation is wrong, then using a "static precondition" instead of normal free static asserts may give a bit better error messages (errors at the instantiation point instead of inside the template). But I guess this is just a limit of the compiler, not a problem of the language... Bye, bearophile
Dec 14 2010
Walter Bright wrote:bearophile wrote:Actually I think there's considerable potential for better error messages. Currently, if constraints fail for all templates, the error message prints the full constraint for the first template, which is not very helpful. A huge improvement would be to distinguish "no templates match at all", (eg the number of parameters is different) from "there are templates which would match, except that the template constraints fail".Andrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
On Tuesday 14 December 2010 00:45:02 Don wrote:Walter Bright wrote:Simply indicating that some of the templates' signatures match (or that none do) but that their constraints fail would be useful. Right now, you don't even know whether its the signature that doesn't match or whether it's the constraint that fails. - Jonathan M Davisbearophile wrote:Actually I think there's considerable potential for better error messages. Currently, if constraints fail for all templates, the error message prints the full constraint for the first template, which is not very helpful. A huge improvement would be to distinguish "no templates match at all", (eg the number of parameters is different) from "there are templates which would match, except that the template constraints fail".Andrei:D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages thatexplain why the instantiation has failed:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.
Dec 14 2010
On 12/14/10 2:45 AM, Don wrote:Walter Bright wrote:Yes, printing the first constraint is quite random. This should be listed as a bug. Andreibearophile wrote:Actually I think there's considerable potential for better error messages. Currently, if constraints fail for all templates, the error message prints the full constraint for the first template, which is not very helpful. A huge improvement would be to distinguish "no templates match at all", (eg the number of parameters is different) from "there are templates which would match, except that the template constraints fail".Andrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
On Tuesday 14 December 2010 00:23:58 Walter Bright wrote:bearophile wrote:It could definitely serve a purpose if _all_ of the possible template specializations fail. Presumably, you intend _one_ of them to work. But that _does_ mean that you get error messages for a number of different template specializations, and you have to sort through them. It _can_ take a fair bit of effort to figure out why a particular template constraint is failing, and it would definitely be nice if there were more information on _why_ a template constraint fails. However, I do agree that doing so could get rather complicated, and that ultimately, it probably isn't worth it. I fully expect, however, that many people in the future will complain that they can't get better error messages which indicate why a particular template constraint failed. - Jonathan M DavisAndrei:D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages thatexplain why the instantiation has failed:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.
Dec 14 2010
On 12/14/10 2:23 AM, Walter Bright wrote:bearophile wrote:Yah, I was planning on writing the same response. AndreiAndrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
Le 14/12/10 09:56, Andrei Alexandrescu a écrit :On 12/14/10 2:23 AM, Walter Bright wrote:I have a question about this and some pieces of code in the standard library, notably std.algorithm: some of the templated functions use template constraints even when no template overloading is taking place. Wouldn't some static asserts help print more accurate messages when these functions are misused? Nicolasbearophile wrote:Yah, I was planning on writing the same response. AndreiAndrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
On 12/14/10 7:33 AM, biozic wrote:Le 14/12/10 09:56, Andrei Alexandrescu a écrit :The intent is to allow other code to define functions such as e.g. "map" or "sort". Generally any generic function should exclude via a constraint the inputs it can't work on. That way no generic function bites off more than it can chew. AndreiOn 12/14/10 2:23 AM, Walter Bright wrote:I have a question about this and some pieces of code in the standard library, notably std.algorithm: some of the templated functions use template constraints even when no template overloading is taking place. Wouldn't some static asserts help print more accurate messages when these functions are misused? Nicolasbearophile wrote:Yah, I was planning on writing the same response. AndreiAndrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
Le 14/12/10 16:50, Andrei Alexandrescu a écrit :On 12/14/10 7:33 AM, biozic wrote:Yes, I understand that this is more important than the accuracy of error messages. ThanksLe 14/12/10 09:56, Andrei Alexandrescu a écrit :The intent is to allow other code to define functions such as e.g. "map" or "sort". Generally any generic function should exclude via a constraint the inputs it can't work on. That way no generic function bites off more than it can chew. AndreiOn 12/14/10 2:23 AM, Walter Bright wrote:I have a question about this and some pieces of code in the standard library, notably std.algorithm: some of the templated functions use template constraints even when no template overloading is taking place. Wouldn't some static asserts help print more accurate messages when these functions are misused? Nicolasbearophile wrote:Yah, I was planning on writing the same response. AndreiAndrei:Adding such error messages misses the point of constraints. The idea is that template overloading is based on constraints. Given 3 templates with 3 constraints, overload resolution picks the one with constraints that pass. Giving error messages for the others is wrong. If you want it to produce error messages if the instantiation is wrong, the correct way is to use static asserts within the template body. No additional features serve any purpose.D's constrained templates were introduced on 17 June 2008 and they've been a smashing hit. Virtually all of Phobos uses them, and I'm sure a lot of generic client code. They take half a minute to explain and solve a difficult problem in a very simple manner.<A template with two constrains makes it less handy to add error messages that explain why the instantiation has failed:
Dec 14 2010
On Tue, 14 Dec 2010 00:49:10 -0800 Jonathan M Davis <jmdavisProg gmx.com> wrote:It could definitely serve a purpose if _all_ of the possible template=20 specializations fail. Presumably, you intend _one_ of them to work. But t=hat=20_does_ mean that you get error messages for a number of different templat=e=20specializations, and you have to sort through them. It _can_ take a fair =bit of=20effort to figure out why a particular template constraint is failing, and=it would=20definitely be nice if there were more information on _why_ a template con=straint=20fails.The case is analog to producing a sensible parsing error message in case of= a choice: P : P1 | P2 | P3 The only solutions are to ignore the issue or to provide error messages for= every Pi. This gives for instance: unittest{ auto a =3D character('a'); auto b =3D character('b'); auto c =3D character('c'); auto ch =3D choice(a, b, c)("ch"); ch.match("d"); } =3D=3D> ****************************************************************** Match Failure: cannot match expected pattern. pattern : ch=3D('a'|'b'|'c') index : 0 found : d Failure reasons for sub-patterns:=20 ****************************************************************** ****************************************************************** Match Failure: cannot match expected pattern. pattern : 'a' index : 0 found : d ****************************************************************** ****************************************************************** Match Failure: cannot match expected pattern. pattern : 'b' index : 0 found : d ****************************************************************** ****************************************************************** Match Failure: cannot match expected pattern. pattern : 'c' index : 0 found : d ****************************************************************** (Actually, the parsing lib does not yet indent sub-pattern error messages -= - I cheated.) I guess a similar scheme can be used for template error messages (when _all= _ versions fail). Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com
Dec 14 2010
On Tue, 14 Dec 2010 01:43:11 -0600 Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> wrote:=20I'm also a bit more of a fan of C++0x concepts than those contraints shown in the slides. I haven't really thought how it all would work out, but if the atmosphere was more ambitious to this direction, I could participate more. But it seems my vision conflicts badly with what D2 has become. =20=20 In all honesty, it is difficult to infer your vision from the trail of=20 your posts. =20 As of C++ concepts, let me mention a few facts fresh from the source (I=20 literally collected them an hour ago). C++ concepts are dead, buried,=20 and decomposing. Nobody is working on them and there is exactly one guy=20 in the world still talking about them. For a variety of theoretical and=20 practical purposes, they will never make it in C++. =20 D's constrained templates were introduced on 17 June 2008 and they've=20 been a smashing hit. Virtually all of Phobos uses them, and I'm sure a=20 lot of generic client code. They take half a minute to explain and solve=a difficult problem in a very simple manner. =20 I'm not saying you can't convince that C++-style concepts would be=20 superior. I'm saying you'll need to bring some solid evidence to the=20 table. If you don't, please don't claim you're being ostracized :o).About "concept" + "programming", you may have a look at XL http://xlr.sourc= eforge.net/concept/toplevel.html (an extensible PL, or a set of PLs, built = to support "concept programming") (more info at http://xlr.sourceforge.net/= concept/top.html). This language also has a very clear (semantics) & nice (= syntax) template/generics system... with constraints (done right, imo). (Ex= ample at http://xlr.sourceforge.net/examples/maximum.html) Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com
Dec 14 2010
Looks like someone did: http://www.reddit.com/r/programming/comments/eklq0/andrei_alexandrescus_talk_at_accu_silicon_valley/ On 12/12/10, Walter Bright <newshound2 digitalmars.com> wrote:Andrei Alexandrescu wrote:Compared to the talk at Google, I changed one of the "cool things" from threading to operator overloading. Didn't manage to talk about that - there were a million questions - although I think it's a great topic. http://erdani.com/tdpl/2010-12-08-ACCU.pdfAnyone care to do the honors and post this to reddit programming?
Dec 12 2010
Hi, Thanks for sharing the doc.I changed one of the "cool things" from threading to operator overloading.May I know the reason behind the change? Is it that you intend to pick different "3 cool things" at different talks? or do you think operator overloading is 'cooler' than concurrency? Thanks, Hemanth
Dec 12 2010
On 12/12/10 9:50 PM, Hemanth Kapila wrote:Hi, Thanks for sharing the doc. I changed one of the "cool things" from threading to operator overloading. May I know the reason behind the change? Is it that you intend to pick different "3 cool things" at different talks? or do you think operator overloading is 'cooler' than concurrency? Thanks, HemanthI thought since the video of my Google talk is already online, I better offer something new. I would have changed two of the three topics, but didn't have time. It's ironic I couldn't find time to talk about overloading. Andrei
Dec 12 2010
Jonathan M Davis:I don't see what that poster thought would be gained by enforcing that,If you read that part in the Reddit thread you see that the gain is in a (supposed) higher understandability of the code that uses the operators.but it's _really_ easy to have useful and legitimate overloaded operators which can't be pure.Do you have examples? Bye, bearophile
Dec 13 2010
On Monday 13 December 2010 04:05:33 bearophile wrote:Jonathan M Davis:At the momement, pretty much none of the operator overloads in std.datetime are pure, and while some of them _may_ be able to become pure with the pure nothrow bug fixed, I don't think that they'll all be able to. All it takes is _one_ function in the whole call chain which can't be pure, and then _none_ of them can pure. It's _really_ easy to make purity not possible. Things will improve as more of Phobos becomes pure, but forcing stuff to be pure is generally a _bad_ idea. - Jonathan M DavisI don't see what that poster thought would be gained by enforcing that,If you read that part in the Reddit thread you see that the gain is in a (supposed) higher understandability of the code that uses the operators.but it's _really_ easy to have useful and legitimate overloaded operators which can't be pure.Do you have examples?
Dec 13 2010
Andrei:http://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good. Bye, bearophile
Dec 13 2010
On 12/13/10 6:11 AM, bearophile wrote:Andrei:Walter wants to keep complex literals. I strongly believe they are completely useless. Andreihttp://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good.
Dec 13 2010
Andrei:Walter wants to keep complex literals. I strongly believe they are completely useless.<Thank you for your answer. So far I have used D complex numbers only two times, so I don't have to use them often, so I don't feel a strong need for them. But I like that people that use them often will find a handy syntax for those literals. Generally I like good literals, it's one of the differences between D and dumb languages. For example I'd like DMD to support multi-precision integer literals too: bigint x = 100_000_000_000_000_000_000_000_000_000_000_000_000; We may write down a list of all the advantages and disadvantages of complex literals (and I'd like someone that writes code that processes complex values to help in the writing of this list), and then try to decide rationally to keep them or remove them. I don't have strong feelings about this topic, so I will have no problems with both results. Bye, bearophile
Dec 13 2010
On Mon, 13 Dec 2010 09:29:15 -0600, Andrei Alexandrescu wrote:On 12/13/10 6:11 AM, bearophile wrote:I agree with this. It would be interesting to know how often people actually write complex literals. I suspect it is *very* rare. And how would it work, anyway? Should we be required to import std.complex to use complex literals? In my opinion, when the built-in complex types are deprecated, the literals should go as well. -LarsAndrei:Walter wants to keep complex literals. I strongly believe they are completely useless.http://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good.
Dec 14 2010
On 12/14/10 2:56 AM, Lars T. Kyllingstad wrote:On Mon, 13 Dec 2010 09:29:15 -0600, Andrei Alexandrescu wrote:I asked people at a seminar during a recess: "How many remarkable complex constants do you know?" After a long pause, one person replied: "1 + 0i". That brought down the house. AndreiOn 12/13/10 6:11 AM, bearophile wrote:I agree with this. It would be interesting to know how often people actually write complex literals. I suspect it is *very* rare. And how would it work, anyway? Should we be required to import std.complex to use complex literals? In my opinion, when the built-in complex types are deprecated, the literals should go as well.Andrei:Walter wants to keep complex literals. I strongly believe they are completely useless.http://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good.
Dec 14 2010
Andrei:I asked people at a seminar during a recess: "How many remarkable complex constants do you know?" After a long pause, one person replied: "1 + 0i".Instead of asking that question, I suggest to ask people that write code that uses complex numbers if they like the idea of complex literals. And I suggest to analyse some Fortran/C code that uses complex numbers and count how often literals may be useful in the code, and how much they may improve the readability of the code. Bye, bearophile
Dec 14 2010
On 12/14/10 3:24 AM, bearophile wrote:Andrei:So you mean I should ask _that_ question but _other_ people.I asked people at a seminar during a recess: "How many remarkable complex constants do you know?" After a long pause, one person replied: "1 + 0i".Instead of asking that question, I suggest to ask people that write code that uses complex numbers if they like the idea of complex literals.And I suggest to analyse some Fortran/C code that uses complex numbers and count how often literals may be useful in the code, and how much they may improve the readability of the code.Magic constants have issues - be they strings, integrals, or doubles. I have trouble thinking that complex literals are somehow exempt. Andrei
Dec 14 2010
Andrei:So you mean I should ask _that_ question but _other_ people.I don't understand what you mean. There right questions need to be asked to the right people. I think most C/C++/D/Java programmers don't use complex numbers, so asking to generic programmers about complex numbers in their code may be useful just to know how often complex numbers are used in programs, but it can't tell you much about how good complex literal are. If you want to design complex numbers in D, you have to ask to people that surely have written more than 100 lines of code that uses complex numbers (in Python too there are complex literals, so some Python programmer too may be useful for such questions).Magic constants have issues - be they strings, integrals, or doubles. I have trouble thinking that complex literals are somehow exempt.I partially agree. They need to be used with care (and defined only once in the code). On the other hand removing all integral literals from my D programs isn't going to improve them :-) Bye, bearophile
Dec 14 2010
On Tue, 14 Dec 2010 05:15:05 -0500 bearophile <bearophileHUGS lycos.com> wrote:=20Magic constants have issues - be they strings, integrals, or doubles. I=in the code). On the other hand removing all integral literals from my D pr= ograms isn't going to improve them :-) What about (char &) string literals? Hello, World! in D: void main () { string message =3D [ 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x21, ]; writeln(message); } And be happy that int's auto-cast to char's! Else, it would be: void main () { string message =3D [ cast(char)0x48, cast(char)0x65, cast(char)0x6c, cast(char)0x6c, cast(char)0x6f, cast(char)0x2c, cast(char)0x20, cast(char)0x57, cast(char)0x6f, cast(char)0x72, cast(char)0x6c, cast(char)0x64, cast(char)0x21, ]; writeln(message); } (works!) (Should we put this version on Wikipedia's Hello, World! page http://en.wik= ipedia.org/wiki/Hello_world_program_examples ?) Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.comhave trouble thinking that complex literals are somehow exempt. =20=20 I partially agree. They need to be used with care (and defined only once =
Dec 14 2010
Lars T. Kyllingstad wrote:On Mon, 13 Dec 2010 09:29:15 -0600, Andrei Alexandrescu wrote:Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of instances) and 2i (one instance).On 12/13/10 6:11 AM, bearophile wrote:I agree with this. It would be interesting to know how often people actually write complex literals. I suspect it is *very* rare. And how would it work, anyway? Should we be required to import std.complex to use complex literals? In my opinion, when the built-in complex types are deprecated, the literals should go as well. -LarsAndrei:Walter wants to keep complex literals. I strongly believe they are completely useless.http://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good.
Dec 14 2010
"Don" <nospam nospam.com> wrote:Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of instances) and 2i (one instance).So if D removes complex literals what the proposed name for Imaginary One would be? _i , i_ , _i_, _I , I , M_I ?? i j looks good to me, I'd like even having them both. Compare code: 0.998f + 2.72e-2fi 0.998f + i*2.72e-2f 0.998f + 2.72e-2f* j
Dec 14 2010
Oh sorry those i and j also would be build in. Ignore this.
Dec 14 2010
Alex_Dovhal <alex_dovhal yahoo.com> wrote:"Don" <nospam nospam.com> wrote:Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of ==instances) and 2i (one instance).So if D removes complex literals what the proposed name for Imaginary=One would be? _i , i_ , _i_, _I , I , M_I ?? i j looks good to me, I'd like even having them both. Compare code: 0.998f + 2.72e-2fi 0.998f + i*2.72e-2f 0.998f + 2.72e-2f* jWith D supporting Unicode, it should clearly be =E2=84=91. -- = Simen
Dec 14 2010
Alex_Dovhal wrote:"Don" <nospam nospam.com> wrote:Complex(9.998f, 2.72e-2f)Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of instances) and 2i (one instance).So if D removes complex literals what the proposed name for Imaginary One would be? _i , i_ , _i_, _I , I , M_I ?? i j looks good to me, I'd like even having them both. Compare code: 0.998f + 2.72e-2fi 0.998f + i*2.72e-2f 0.998f + 2.72e-2f* j
Dec 15 2010
On Wed, 15 Dec 2010 15:20:01 +0100, Don wrote:Alex_Dovhal wrote:And if someone *really* wants to put the "i" in there, they can just define it in their own app: enum i = Complex!double(0, 1); auto z = 0.998 + 2.72e-2*i; -Lars"Don" <nospam nospam.com> wrote:Complex(9.998f, 2.72e-2f)Agreed. I've just looked through some code that I thought used them extensively, but found only two complex literals: 1i (dozens of instances) and 2i (one instance).So if D removes complex literals what the proposed name for Imaginary One would be? _i , i_ , _i_, _I , I , M_I ?? i j looks good to me, I'd like even having them both. Compare code: 0.998f + 2.72e-2fi 0.998f + i*2.72e-2f 0.998f + 2.72e-2f* j
Dec 15 2010
On Wed, 15 Dec 2010 14:34:47 +0000 (UTC) "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> wrote:And if someone *really* wants to put the "i" in there, they can just=20 define it in their own app: =20 enum i =3D Complex!double(0, 1); auto z =3D 0.998 + 2.72e-2*i;+++ Denis -- -- -- -- -- -- -- vit esse estrany =E2=98=A3 spir.wikidot.com
Dec 15 2010
On 12/15/2010 08:34 AM, Lars T. Kyllingstad wrote:And if someone *really* wants to put the "i" in there, they can just define it in their own app: enum i = Complex!double(0, 1); auto z = 0.998 + 2.72e-2*i; -Larsor Complex!"0.998 + 2.72e-2i"
Dec 15 2010
"Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> wrote:And if someone *really* wants to put the "i" in there, they can just define it in their own app: enum i = Complex!double(0, 1); auto z = 0.998 + 2.72e-2*i; -LarsLooks very nice.
Dec 15 2010
On Tue, 14 Dec 2010 10:56:18 +0200, Lars T. Kyllingstad <public kyllingen.nospamnet> wrote:On Mon, 13 Dec 2010 09:29:15 -0600, Andrei Alexandrescu wrote:My first and only proposal to this newsgroup was about literals. C like literals already come with a few serious issues if you use them in a template heavy code. For example a C++ template (which meant to be a generic solution) full of "casts" yes casts!, and this is not an unusual practice The replies i got made me think that D solves some of these. For the topic. Having complex literals cool, but i can live without them! -- Using Opera's revolutionary email client: http://www.opera.com/mail/On 12/13/10 6:11 AM, bearophile wrote:I agree with this. It would be interesting to know how often people actually write complex literals. I suspect it is *very* rare. And how would it work, anyway? Should we be required to import std.complex to use complex literals? In my opinion, when the built-in complex types are deprecated, the literals should go as well. -LarsAndrei:Walter wants to keep complex literals. I strongly believe they are completely useless.http://erdani.com/tdpl/2010-12-08-ACCU.pdfI have a small question. At page 34 of the slides it says:- Built-in complex types are being replaced by library typesAre complex types totally replaced, or is the complex literals syntax (like 10+10i) kept? Keeping those literals may be good.
Dec 14 2010