August 20, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all. On Tuesday, 20 August 2013 at 21:52:29 UTC, Andrei Alexandrescu wrote: > On 8/20/13 2:22 PM, Ramon wrote: >> = vs := > > void main() { > int a, b; > if (a = b) {} > } > > ./test.d(4): Error: assignment cannot be used as a condition, perhaps == was meant? > > This is a solved problem. (However see also http://d.puremagic.com/issues/show_bug.cgi?id=10862 which I just submitted). I haven't heard a peep about it in D and C++ circles (most C++ compilers define a similar warning, although they aren't required). I did as advised and found: > Now consider: > > void main() { > int a, b; > if ((a = b) = 0) {} > } > > This compiles diagnostic-free. The shape if (expr1 = expr2) should be > disallowed at a grammatical level, i.e. during parsing Oops. So, after all, making it invitingly easy to mix up assignment and comparison can actually be troublesome? Wow. >> I've seen hints from the authors of D themselves that '++' and '--' >> might not be the wisest way of action. So I stand here asking "Why the >> hell did they implement them?" > > That would be news to me. I find "++" and "--" very useful for daily use. D also implements their overloading arguably in a more elegant way than C++ does. I don't remember the precise spot but somewhere (here on this site) someone from the D team says something to the effect of maybe pre *and* post inc/dec might be not so desirable. Whatever, it was *my* error to express myself not precisely. Yes, ++ and -- *are* useful. What I meant (and didn't make clear) was that there are 2 versions, post and pre. One of them is fine, two versions, pre and post, can create trouble. >> It would be very simple to implement that logic in an editor for those >> who feel that life without '++' is impossible to automagically expand >> "x++" to "X := x + 1". > > This argument is unlikely to do very well with this crowd. So do other arguments in a C++ crowd. Happily enough you did think what you thought and what made you aork on D anyway. >> Having seen corporations in serious trouble >> because their system broke (or happily continued to run albeit producing >> erroneous data ...) for this "small detail" I have a hard time to defend >> '++'. ("Save 5 sec typing/day and risk your company!"). > > Very interesting! What pernicious effects does "++" have? Same thing as above. Pre-inc'ing e.g. a pointer that should be post-inc'ed can lead to pretty ugly situations. >> Another issue (from an Ada background): Why "byte" ... (the complete >> series up to) ... "cent"? Bytes happen to be important for CPUs - not >> for the world out there. I wouldn't like to count the gazillion cases >> where code went belly up because something didn't fit in 16 bits. Why >> not the other way around, why not the whole she-bang, i.e., 4 (or) 8 >> bytes as default for a single fixed point type ("int") and a mechanism >> to specify what actually is needed? >> So for days in a month we'd have "int'b5 dpm;" (2 pow x notation) or >> "int'32dpm;"? > > As a rule of thumb primitive types model primitive machine types. For everything else there are libraries. Or should be :o). > >> This happens to be a nice example for perspective. C's perspective (by >> necessity) was resource oriented along the line "offer an 8bit int so as >> to not waste 16bits were 8bits suffice". >> Yet we still do that in the 21st century rather than acting more *human >> oriented* by putting the decision for the size to the human. Don't >> underestimate that! The mere action of reflecting how much storage is >> needed is valuable and helps to avoid errors. > > There's very much wrong in this. Byte-level access is necessary in a systems language for a variety of reasons, of which storing individual integers is probably the least interesting. There is a reason or explanation for everything, no matter what. But my point was another one. It was about another perspective. C's and, so it seems, D's perspective is "What's natural with a CPU" - mine is "What's natural and useful for humans trying to solve problems". With all respect, Andrei, your argument doesn't mean too much to me anyway because if the job at hand is pure system low level programming, I'll do it in C anyway. Furthermore it is well understood nowadays that it might be smart to split even OS design into a HAL (C/Asm) and higher level stuff (higher level language). Does it hurt performance to do everything in 32 bits rather than in, say, 16 bits (on a 32 or 64 bit CPU)? Last time I looked at CPU specs, no. Finally, yes, some system level programming needs byte pointers. Well, how difficult or expensive could it be to implement a byte pointer? I think it's in the well feasible range. But again, my argument wasn't about system programming, which, of course, is the perfect argument for D. OTOH: Is D really and only meant for systems programming? Hardly. > Deprecating "=" in favor of ":=" would solve a problem that doesn't exist, and would create a whole new one. It *does* exist. Unless of, course, you are not content to consider and treat myself as a lowly moron but the creators of Pascal, Ada, Eiffel, and others, as well (and btw yourself, too. Have a look at the link you provided above ...) And, just for completeness sake: May I ask *what* new problems ':=' would create? Other than adding a single char in the parser, that is. > >> I wish, D had done all the miraculos things it did - and then on top, >> had allowed itself the luxury to be more human centric rather than >> sticking to a paradigm that was necessary 50 years ago (and even then >> not good but necessary) > > I understand we all have our preferences, but reifying them to absolutes is specious. If you said "Yo dudes, I don't dig '=' for assignments and '++' and '--' for {inc,dec}rement. Also I don't give a rat's tail on dem fixed small integers. Other that dat, y'all boys did a rad job. Peace." - well that would have been easier to empathize with. Oh master, now that the man, to whom I would have referred as "Huh? Andrei WHO??" 2 weeks ago, has told me, I understand that it can't be tolerated to havea prsonal style of thinking and putting things. Can I be forgiven, if I pray 10 Ave Maria and clean your shoes with my worthless lips? Just btw: I don't care rat sh*t whether you empathize with me or like me. >> BTW: I write this because D means a lot to me not to bash it. For Java, >> to bname an ugly excample, I never wasted a single line of criticism; >> t'sjust not worth it. So, please, read what I say as being written in a >> warm tone and not negatively minded. > > Awesome, thank you and keep destroying. "destroying"??? Which part of "not to bash it" and of "D means a lot to me" and of "D is, no doubts, an excellent and modern incarnation of C/C++. As far as I'm concerned D is *the* best C/C++ incarnation ever, hands down." was too complicated to understand for your genius brain? Just in case you are able to be professional on a human level for a moment: I want to buy your book and did look for it. It seems though that it's not easily available in Germany (amazon.de). Would you happen to have a hint for me where I can get it over here? Thanks. |
August 20, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ramon | On Tuesday, 20 August 2013 at 22:49:40 UTC, Ramon wrote: > Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all. >> Awesome, thank you and keep destroying. > > "destroying"??? Which part of "not to bash it" and of "D means a lot to me" and of "D is, no doubts, an excellent and modern incarnation of C/C++. As > far as I'm concerned D is *the* best C/C++ incarnation ever, > hands down." was too complicated to understand for your genius brain? I knew this would happen at some point: Andrei uses "destroy" as a positive term to denote a well-reasoned powerful argument/response. Chill :) |
August 20, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On Wed, Aug 21, 2013 at 12:58:16AM +0200, John Colvin wrote: > On Tuesday, 20 August 2013 at 22:49:40 UTC, Ramon wrote: > >Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all. > > >>Awesome, thank you and keep destroying. > > > >"destroying"??? Which part of "not to bash it" and of "D means a lot to me" and of "D is, no doubts, an excellent and modern incarnation of C/C++. As far as I'm concerned D is *the* best C/C++ incarnation ever, hands down." was too complicated to understand for your genius brain? > > I knew this would happen at some point: > Andrei uses "destroy" as a positive term to denote a well-reasoned > powerful argument/response. > > Chill :) Ahhahaha, so Andrei dropped the "destroy" word without explaining how we use it around these parts. :) For the sake of Ramon and all others who are new around here: there is a tradition on this forum where after you present a (hopefully well-reasoned) argument or wrote some D code you want to put up for peer review (e.g. to include in Phobos), you'd ask others to "destroy" your argument/code as a friendly way of saying "please find all the flaws you can so I can fix them and make it even better". I'm not sure how this usage came about, as it predated my time, but my guess is that in the past, someone would post something they're totally convinced about, only to have somebody on the forum completely tear it apart and point out all the glaring flaws that it failed to address. After a while it became something one expects will happen every time, so in a friendly, faux-challenge sort of way people would invite others to "destroy" their arguments/code/etc., and this became a tradition. In any case, "destroy" as used in these parts is a positive word, not a hostile challenge. So relax. :) T -- Doubt is a self-fulfilling prophecy. |
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | On Tuesday, 20 August 2013 at 22:58:24 UTC, John Colvin wrote:
> On Tuesday, 20 August 2013 at 22:49:40 UTC, Ramon wrote:
>> Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all.
>
>>> Awesome, thank you and keep destroying.
>>
>> "destroying"??? Which part of "not to bash it" and of "D means a lot to me" and of "D is, no doubts, an excellent and modern incarnation of C/C++. As
>> far as I'm concerned D is *the* best C/C++ incarnation ever,
>> hands down." was too complicated to understand for your genius brain?
>
> I knew this would happen at some point:
> Andrei uses "destroy" as a positive term to denote a well-reasoned powerful argument/response.
>
> Chill :)
Uhum.
Well, where I live "to destroy" has a pretty clear and very negative meaning.
I took that post (of Mr. Alexandrescu) as very rude and condescending and I do not intend to change my communication habits so as to understand "to destroy" as a positive statement or even a compliment. While I'm certainly not in a position to look down on J. Ichbiah, N. Wirth, and B. Meyer, I have certainly not spent the last 25+ years without understanding a thing or two about my profession, no matter what Mr. Alexandrescu seems to think.
No matter what Mr. Alexandrescu thinks or likes/dislikes or how he behaves I recognize (and praise) D as a very major improvement on C/C++ and as a very attractive language (by no means only for system programming).
Furthermore I recognize and respect Mr. Alexandrescu's profound knowledge of D and the (assumed and highly probable) value of his book and thank him for his work.
Maybe I'm simply profitting from my being a lowly retarded creature who, as some kind of a generous compensation by nature, is capable to recognize the knowledge and work of others irrespective of their being friendly or rightout rude and condescending.
As for Mr. Alexandrescu's book, I'm glad to report that I will no longer need to molest him with my lowly requests. I have found a way to buy an epub version (through InformIt/Pearson). "D The programming language" has been bought and already downloaded and I'm looking forward to learn quite a lot about D from it.
Regards - R.
|
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ramon | This comment set put together with recent avalanche of JS posts makes a lovely collection of internet abuse techniques :) I can't even rage. It is brilliant. |
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ramon | On Wed, Aug 21, 2013 at 03:46:33AM +0200, Ramon wrote: > On Tuesday, 20 August 2013 at 22:58:24 UTC, John Colvin wrote: > >On Tuesday, 20 August 2013 at 22:49:40 UTC, Ramon wrote: > >>Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all. > > > >>>Awesome, thank you and keep destroying. > >> > >>"destroying"??? Which part of "not to bash it" and of "D means a > >>lot to me" and of "D is, no doubts, an excellent and modern > >>incarnation of C/C++. As > >>far as I'm concerned D is *the* best C/C++ incarnation ever, > >>hands down." was too complicated to understand for your genius > >>brain? > > > >I knew this would happen at some point: > >Andrei uses "destroy" as a positive term to denote a well-reasoned > >powerful argument/response. > > > >Chill :) > > Uhum. > > Well, where I live "to destroy" has a pretty clear and very negative > meaning. > I took that post (of Mr. Alexandrescu) as very rude and > condescending and I do not intend to change my communication habits > so as to understand "to destroy" as a positive statement or even a > compliment. While I'm certainly not in a position to look down on J. > Ichbiah, N. Wirth, and B. Meyer, I have certainly not spent the last > 25+ years without understanding a thing or two about my profession, > no matter what Mr. Alexandrescu seems to think. I didn't find Andrei's tone condescending at all. I think you're misunderstanding his intent. Disagreement with your ideas is one thing, but being rude is completely another thing. I would not stand for anyone, even if it's Andrei, being rude to a newcomer, but I don't perceive his response as being rude at all, even if he did disagree with you. It's an unfortunate consequence of online communication that tone of voice and other extra-linguistic elements are not adequately conveyed, as a result, things tend to be taken at face value, such as the use of the word "destroy". Those of us who know Andrei better understand that he's using that word in a joking / non-serious way, but given that you're a newcomer here and don't have the necessary context to interpret what he wrote, I can totally understand how you would interpret it in a negative way. The fact that he didn't bother explaining what he meant didn't help, since at face value, "destroy" does indeed have a very negative connotation. To prove what I said about his intent, one could read through the forum archives to see the use of the word "destroy" in a non-serious way, but since it's not really appropriate for me to put the burden on you to do so, I'll merely mention it. Whether you take my word for it or not, ultimately doesn't really matter that much, but I thought I should belabor this point for the sake of other newcomers here who may experience the same misunderstanding. T -- VI = Visual Irritation |
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ramon | On Wednesday, 21 August 2013 at 01:46:37 UTC, Ramon wrote: > On Tuesday, 20 August 2013 at 22:58:24 UTC, John Colvin wrote: >> On Tuesday, 20 August 2013 at 22:49:40 UTC, Ramon wrote: >>> Happily I'm stupid and completely missed the condescending tone of an evident genius. Instead I'll just be grateful that it pleased one of the D masters to drop some statement down at me at all. >> >>>> Awesome, thank you and keep destroying. >>> >>> "destroying"??? Which part of "not to bash it" and of "D means a lot to me" and of "D is, no doubts, an excellent and modern incarnation of C/C++. As >>> far as I'm concerned D is *the* best C/C++ incarnation ever, >>> hands down." was too complicated to understand for your genius brain? >> >> I knew this would happen at some point: >> Andrei uses "destroy" as a positive term to denote a well-reasoned powerful argument/response. >> >> Chill :) > > Uhum. > > Well, where I live "to destroy" has a pretty clear and very negative meaning. > I took that post (of Mr. Alexandrescu) as very rude and condescending and I do not intend to change my communication habits so as to understand "to destroy" as a positive statement or even a compliment. While I'm certainly not in a position to look down on J. Ichbiah, N. Wirth, and B. Meyer, I have certainly not spent the last 25+ years without understanding a thing or two about my profession, no matter what Mr. Alexandrescu seems to think. > > No matter what Mr. Alexandrescu thinks or likes/dislikes or how he behaves I recognize (and praise) D as a very major improvement on C/C++ and as a very attractive language (by no means only for system programming). > Furthermore I recognize and respect Mr. Alexandrescu's profound knowledge of D and the (assumed and highly probable) value of his book and thank him for his work. > > Maybe I'm simply profitting from my being a lowly retarded creature who, as some kind of a generous compensation by nature, is capable to recognize the knowledge and work of others irrespective of their being friendly or rightout rude and condescending. > > As for Mr. Alexandrescu's book, I'm glad to report that I will no longer need to molest him with my lowly requests. I have found a way to buy an epub version (through InformIt/Pearson). "D The programming language" has been bought and already downloaded and I'm looking forward to learn quite a lot about D from it. > > Regards - R. I'm sorry you felt offended by that, but I can assure you, he didn't mean anything negative by it. I probably won't convince you, but here are a few other times the word "destroy" has been used in a similar manner (the first is by Andre): http://forum.dlang.org/thread/kooe7p$255m$1@digitalmars.com http://forum.dlang.org/thread/iauldfsuxzifzofzmaxq@forum.dlang.org http://forum.dlang.org/thread/rhwopozmtodmazcyiazj@forum.dlang.org http://forum.dlang.org/thread/jlbsreudrapysiaetyrp@forum.dlang.org I agree though, it isn't the best term, especially for someone who isn't accustomed to this community, but it's part of the culture. Cheers! |
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | If I'm not completely mistaken, Mr. Alexandrescu could notice the obvious fact that I'm new here. Whatever, the interesting issue is not myself, or some, so it seems, hate and rage obsessed member whose screen name I don't remember, no matter how often he informs me about his negative feelings, or Mr. Alexandrescu (insofar as being a major figure in the "D crowd" and a co-developer of D automatically gives him a certain importance in matters of D), *the interesting issue is D*. Thanks to some of your constructive and socially competent posts to me my worries are greatly reduced and if I'm somewhat unhappy the reason isn't D but my somewhat unrealistic wishes and my possibly premature excitation. From what I see so far, D wins hands down against other languages that I've looked into in a quest over quite some years now. It's not perfect for me but then nothing is perfect for everyone. What matters is a simple question in the end: Does the overall mix support me in my work and in my striving to efficiently produce code that meets my standards in terms of reusability, reliability and others? While I still feel that Eiffel comes somewhat closer to my "dream language" I have to - and do - also see that in the end some pragmatic criteria make D the best choice for me. It should also be seen that at *no point in time* did I say (or feel) that D is bad or mediocre. It was clear from the beginning that D is in the top 3 anyway. Looking at it like this, this whole thing is basically a luxury discussion. And again, I did question (and question critically) D *because* it's so great and deserves attention incl. critically questioning. As for Mr. Alexandrescu, the main importance (IMO) is in him being an important D figure. Whether D should offer a friendly, forgiving and welcoming interface to newcomers or whether expecting newcomers are to know about Mr. Alexandrescu's personal habits and acting in a way that at least makes it easy to be misunderstood in an unpleasant and possibly apalling way is not for me to decide. For me it's more important whether Mr. Alexandrescu is capable to write a good book about D that helps me during my first steps (and possibly even beyond that). From what I know so far, this seems highly probable and I'm looking forward to start reading it tomorrow and to learn. Nevertheless, thanks for your constructive and positive way to approach things once more ;) R. |
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Wednesday, 21 August 2013 at 02:01:48 UTC, Dicebot wrote:
> This comment set put together with recent avalanche of JS posts makes a lovely collection of internet abuse techniques :)
>
> I can't even rage. It is brilliant.
Thanks so much for your repeated status updates for your emotions. This is immensely important and doubtlessly of high significance for D. Just out of curiosity: Do you also sometimes refer to D or D related matters here?
(Don't call. We will contact you ...)
@Tyler Jameson Little
Thank you. As you are not the first one to excuse/explain Mr. Alexandrescu's, uhm, (sometimes?) strongly individual communication style, I take that to (positively) imply that, except for some quite unlucky situations, Mr. Alexandrescu is well liked by many around here. ACK.
Concerning this as well as the "D crowd" and the culture here, kindly give me some time to find my way around here and in D, will you.
If this community is just half as attractive as D, and there are indications it is, I'll soon be a happy member ;)
|
August 21, 2013 Re: Possible solution to template bloat problem? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ramon | An important aspect in developing anything is a forum where people can destroy ideas and opinions clearly and succinctly without fear of the destroyed taking it personally. Technical arguments, and counter-arguments, are best when they stick to the point without fear of the other being overly precious. Andrei was *not* rude, he simply showed cases where he disagreed with your post and gave reasonable arguments as to why. In no way did he make any personal remark about you or your intelligence. If you choose to take it personally because he disagreed with you then it is not his fault, nor his problem. You either counter-destroy, with a more solid set of arguments and examples, or you accept their case and move onto the next difficult problem. However, if the remarks were personal and of the order "You are clearly stupid mate. Everyone knows ABCD 1234!" then it would be rude and I could understand your discontent. There is a clear difference. |
Copyright © 1999-2021 by the D Language Foundation