- Variable declaration syntax - 8 Updates
- [Jesus Loves You] Tag for filtering - 6 Updates
- Virtual functions - 6 Updates
- EXAMPLE - 4 Updates
- cmsg cancel <otar18$dp3$1@dont-email.me> - 1 Update
| "Öö Tiib" <ootiib@hot.ee>: Apr 10 04:27AM -0700 On Tuesday, 10 April 2018 13:22:52 UTC+3, David Brown wrote: > What would have been possible in C++ would be to deprecate the mixture - > allowing either "int a, b;" or "int *a, *b;" but giving an error for > "int a, *b;" or "int *a, b;" regardless of white space positioning. Isn't it about way more things than just type and pointers to type in mix? I think that is "well-formed" C++ code: int *a, b, c(long x), d[5]; In real C++ code bases it is getting irrelevant because raw arrays are rarely used and raw pointers are rarely used and lot of coding standards forbid to declare more than one thing per declaration. |
| David Brown <david.brown@hesbynett.no>: Apr 10 01:57PM +0200 On 10/04/18 12:49, Kenny McCormack wrote: >> an error for "int a, *b;" or "int *a, b;" regardless of white space >> positioning. > Except that it would break existing code... Yes - it would have been another incompatibility between C and C++. There has always been a number of C constructs that are not compatible with C++. It would have caused few issues with "real" C++ code, since there is much more of a tendency to initialise variables when they are declared, and therefore there are rarely many of them declared on each line. But it would have cause issues with existing C code - ones that would be easily found (from compiler error messages) and easily fixed. |
| David Brown <david.brown@hesbynett.no>: Apr 10 01:59PM +0200 On 10/04/18 13:27, Öö Tiib wrote: >> allowing either "int a, b;" or "int *a, *b;" but giving an error for >> "int a, *b;" or "int *a, b;" regardless of white space positioning. > Isn't it about way more things than just type and pointers to type in mix? Yes - T and T* are just an example. > I think that is "well-formed" C++ code: > int *a, b, c(long x), d[5]; You can get a lot worse than that (you can throw in some function declarations, typedefs, etc.), but such mixes are fortunately rare in real code - even in C code without coding standards. |
| bartc <bc@freeuk.com>: Apr 10 01:09PM +0100 On 10/04/2018 12:27, Öö Tiib wrote: > In real C++ code bases it is getting irrelevant because raw arrays > are rarely used and raw pointers are rarely used and lot of coding > standards forbid to declare more than one thing per declaration. Why don't more people who write coding standards design language syntax? They seem to have more sense. -- bartc |
| "Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 10 05:11AM -0700 On Tuesday, April 10, 2018 at 6:27:14 AM UTC-4, David Brown wrote: > the language. Having warnings (or even error messages) here is a good > thing, but I would have something like "mixed declaration" rather than > "ambiguous declaration". My view is, in certain cases such as this declaration extension, spaces could and should serve as delineators. It would simplify code by making the one left-side declaration, allowing everything on the right to be of that type. It would remove the need for the existing pointer declar- ation syntax which can be prickly, and it would not break existing code because the new form would have to be enabled to be used. ----- CAlive also takes a different view on how to declare pointers so they are more visual: CWhatever [pointer], instance; By declaring a token name in brackets, it makes it a pointer. You can also declare a pointer to a pointer: CWhatever [[pointer_to_pointer]]; And when you go to reference them in code (you can do this using also the dot form because CAlive makes . and -> synonymous, and also allows instances of --> or ---> to be the same as -> for alignment): CWhatever [p], [[pp]]; // Same as CWhatever* p; CWhatever** pp; p.member; // Access p->member using . pp = &p; [pp].member; // Same as (*pp)->member, again using . It's a nod to assembly language, which uses [reg] for indirection, and an extension of that syntax to [[pp]] for double-indirection. But, that's neither here nor there. The people who choose to use CAlive when it's completed will do so for many reasons, not just declaration or pointer syntax. Mostly for its LiveCode ABI, the inclusion of the simple class, and enhanced exception handling, would be my estimation. -- Rick C. Hodgin |
| Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 10 01:26PM +0100 On 10/04/2018 01:21, Rick C. Hodgin wrote: > other code does. A CAlive program with errors will compile and run > until it reaches the error code, then it will enter a new state > called an inquiry. So what you are saying is that the CAlive compiler requires a human presence so it cannot be used with an automated build system for example? This and the ridiculous whitespace thing that would be better solved by an error if different types are present in a multi-variable declaration just confirms what I said in my other post: your software is toy as it is next to useless as it doesn't sit well with modern well established software development practices. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
| "Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 10 08:43AM -0400 On 4/10/2018 8:26 AM, Mr Flibble wrote: > So what you are saying is that the CAlive compiler requires a human > presence so it cannot be used with an automated build system for > example? No. CAlive will compile fully automated. It has default handlers for inquiry conditions which mimic terminate-early / abort functions, after saving some information about the inquiry state to disk. Developers can also write their own inquiry() functions, which will handle inquiry conditions. CAlive is part of a framework being created which supports it, called RDC (Rapid Development Compiler). It's designed (initially) to be a fast source code development tool. You code, run, get to an inquiry state, code more, resume, all while running the actual binary. This feature was designed for me as I make many coding mistakes when writing source code, nearly all of which do not represent my thoughts, but are due to mistakes in translation from thought to fingers. And I'm absolutely amazed at some of the mis-translations that occur. I can go to write a particular word, and a word that merely sounds like it, but is spelled completely differently, can come out. I sit there at times saying out loud, "Wow!" > This and the ridiculous whitespace thing that would be better > solved by an error if different types are present in a multi-variable > declaration CAlive already has defined the use of CWhatever* as a type, and will use that across the line when in CAlive mode. When in compatibility mode, it will work as it does today. It's an extension, Leigh, not the end of the world. > just confirms what I said in my other post: your software is > toy as it is next to useless as it doesn't sit well with modern well > established software development practices. You don't have to use it, Leigh. My feeling won't be hurt. CAlive should not impact or affect you in the slightest. -- Rick C. Hodgin |
| scott@slp53.sl.home (Scott Lurndal): Apr 10 01:04PM >In real C++ code bases it is getting irrelevant because raw arrays >are rarely used and raw pointers are rarely used and lot of coding >standards forbid to declare more than one thing per declaration. What's a "real C++ code base"? We've several million lines of actively developed C++ code that uses raw arrays and raw pointers. |
| "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 09 04:43PM -0700 On 4/9/2018 4:35 PM, Rick C. Hodgin wrote: > ing church and ask to speak to born again believers face-to-face. > Seek to learn the truth, Chris. Don't just scheme to trap people > into caged Q&A of your own contrivance. What a cop out. |
| gazelle@shell.xmission.com (Kenny McCormack): Apr 09 11:46PM In article <pagtro$dv4$1@dont-email.me>, >> Seek to learn the truth, Chris. Don't just scheme to trap people >> into caged Q&A of your own contrivance. >What a cop out. Did you expect anything else? I don't think Ricky has answered one single question we've ever posted to him. Religious people never do. Because they can't. -- The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/FreeCollege |
| "Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Apr 09 04:58PM -0700 On Monday, April 9, 2018 at 7:46:36 PM UTC-4, Kenny McCormack wrote: > I don't think Ricky has answered one single question we've ever posted to > him. > Religious people never do. Because they can't. It's not like that, Kenny, Chris. It's that Christians see the traps Satan lays for people. Satan tries to trap people into caged boxes where the response they give in that case would serve to lead to Satan's desired end. The real part that needs addressed is not found in Satan's traps (played out through sinful men's minds unto others). The real part that needs addressed is given by God, and it necessarily mandates a pulling away from Satan's trap, and a teaching of the part that is of real benefit. There is no growth, no understanding in following after Satan's traps. There is growth in learning about Jesus Christ, sin, judgment, and God's free gift of grace in salvation from sin so that there will be no judgment. You need to start there if you want to seek the truth. It's why Christians do not answer silly and contrived questions (because they come from Satan and have a purpose to keep a person AWAY from true and right knowledge of Jesus Christ). Christians consistently avoid those traps and point people to Jesus Christ. Someday you'll both understand ... one way or another. -- Rick C. Hodgin |
| Daniel <danielaparker@gmail.com>: Apr 09 07:23PM -0700 On Monday, April 9, 2018 at 2:58:07 PM UTC-4, Rick C. Hodgin wrote: > Our sinful flesh pulls at us in different ways. Some are drawn > to homosexuality, others to adultery and fornication ... I don't know about this. I think that Christians sometimes underestimate the difficulties in committing sins of the flesh, I've never found it as easy as they make out, especially if you care to maintain some fastidiousness in regards to the "sinee". And besides, some of us spend way too much time here to have much time left for serous sinning. Daniel |
| "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid>: Apr 09 10:59PM -0700 , On 4/9/2018 4:46 PM, Kenny McCormack wrote: > I don't think Ricky has answered one single question we've ever posted to > him. > Religious people never do. Because they can't. All he basically had to say would be something along the lines of: _____________ Well, I would talk over all options with my doctor. We would pick the best path wrt the state of my personal psychical being/body. ____________ If the selected plan happened to be created by a gay person, well, so be it. Seriously, why would anybody even think about outright rejecting it based on that fact alone? |
| Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 10 01:20PM +0100 On 10/04/2018 00:58, Rick C. Hodgin wrote: > It's that Christians see the traps Satan lays for people. Satan > tries to trap people into caged boxes where the response they give > in that case would serve to lead to Satan's desired end. No. You use Satan as an excuse to not answer any question that might conflict with your worldview so Kenny is correct when he says that religious people can't answer such questions. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
| legalize+jeeves@mail.xmission.com (Richard): Apr 05 07:38PM [Please do not mail me a copy of your followup] >On 5.04.2018 20:28, Mr Flibble wrote: >> TDD is cancer. Designing software by fixing failing tests is no way to >> design software. I knew there was a reason you were in my KILL file... -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
| scott@slp53.sl.home (Scott Lurndal): Apr 06 03:41PM > It only exemplifies your stolidness in refusing to >accept the possibility that you might be wrong. Do you accept the possiblity that you might be wrong? |
| legalize+jeeves@mail.xmission.com (Richard): Apr 06 05:13PM [Please do not mail me a copy of your followup] Ian Collins <ian-news@hotmail.com> spake the secret code >>> Driven Development instead of Test Driven Development. The main >>> activity is a design activity, not a testing activity. >> Bullshit. TDD isn't design driven in the slightest. If you haven't experienced TDD as a design activity, then IMO you haven't been doing it right. Everyone I know that embraces TDD comes away with this experience. Seriously. >It isn't? That's news to me. Me too as well as everyone I've ever talked to that embraced TDD fully. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
| Ian Collins <ian-news@hotmail.com>: Apr 06 03:07PM +1200 > On Thursday, April 5, 2018 at 4:47:54 PM UTC-5, Mr Flibble wrote: > TGIT -- Thank G-d it's Thursday. TGIF Its Friday here... -- Ian. |
| legalize+jeeves@mail.xmission.com (Richard): Apr 05 05:21PM [Please do not mail me a copy of your followup] Tim Rentsch <txr@alumni.caltech.edu> spake the secret code >as a first "OOP" language makes it harder to acquire the OOP >mindset. No evidence, mind, besides this one data point, but >it is still an interesting conjecture. Anecdotally, this is my experience as well. My first OOP language was C++ and it wasn't until I started practicing TDD that I felt the benefit of SOLID design principles. >"ad hoc polymorphism". (This is assuming the terminology hasn't >changed since I was active in the field, which it may very well >have.) It's common to refer to template genericity as static polymorphism in C++ and the typical virtual method style polymorphism as dynamic or run-time polymorphism. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
| Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Apr 06 04:16PM +0100 On 06/04/2018 16:07, Rick C. Hodgin wrote: > You've been warned multiple times, Leigh. There's more out there than > you think. And you will perish in eternal Hellfire if you refuse to > even consider it. Your eternity is at stake. Do not be flippant. In the trade we call this "projection"; i.e.: You can repeat that statement as often as you like. It doesn't change a single thing. It only exemplifies your stolidness in refusing to accept the possibility that you might be wrong. You are asserting your own personal belief that you're right ahead of the possibility that you might be wrong. You refuse to accept God doesn't exist on the basis of something you may be wrong about. It is your own stubbornness toward purposeful ignorance that will have you die in ignorance, Rick. Nothing else will do it, because we have given you every opportunity to be educated. You've been warned multiple times, Rick. There's more out there than you think. And you will die in ignorance if you refuse to even consider it. Your legacy is at stake. Do not be flippant. /Flibble -- "Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Bryne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?" "I'd say, bone cancer in children? What's that about?" Fry replied. "How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil." "Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say." |
| Paavo Helde <myfirstname@osa.pri.ee>: Apr 06 12:23AM +0300 On 5.04.2018 22:37, Richard wrote: >> program logic if it is all nicely linear in a single function. > So presumably he hates this example? > <https://www.industriallogic.com/xp/refactoring/composeMethod.html> Not sure. Maybe. Or maybe not. He has never given a straight answer to any questions I (or anybody else AFAIK) have asked, so in last years I have stopped asking him anything. To give him credits, he actually produces working code far from trivial, albeit very slowly, and there are very few bugs in the final code. So, if the code works, and there are no bugs, then why could it not be a 239-line function? I guess now he will spend the next 2 weeks on refactoring this function into 50-line functions. I'm starting to doubt my code review decisions... |
| legalize+jeeves@mail.xmission.com (Richard): Apr 05 07:37PM [Please do not mail me a copy of your followup] Paavo Helde <myfirstname@osa.pri.ee> spake the secret code >all when I told him this is no good. He said he cannot think up names >for smaller functions and anyway he finds it easier to follow the >program logic if it is all nicely linear in a single function. So presumably he hates this example? <https://www.industriallogic.com/xp/refactoring/composeMethod.html> -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Terminals Wiki <http://terminals-wiki.org> The Computer Graphics Museum <http://computergraphicsmuseum.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
| Paavo Helde <myfirstname@osa.pri.ee>: Apr 06 08:14AM +0300 On 6.04.2018 0:57, Robert Wessel wrote: > line lambda? Leaving aside for a moment that any size goals for a > lambda probably ought to be considerably shorter that the usually "50 > line" limit. The line limit comes from the desire to fit the whole function to the screen at the same time. In our typical development environment this is indeed ca 50 lines. Of course there are exceptions, if I have a switch with 200 cases I should better forget about the line limit. I believe in languages with nested functions they have some code clarity rules to place the nested functions in the beginning or in the end of the parent function, so that the parent function code could be seen together on the screen. The problem with lambdas is that they must be placed in the middle of the parent function, disrupting it. So I would say there is a problem with both the 187 line lambda and the 52 line parent function, neither can be fit to the screen (either too long or disjoint). |
| Paavo Helde <myfirstname@osa.pri.ee>: Apr 06 08:25AM +0300 On 6.04.2018 0:41, Richard wrote: > magnitude longer than when I practice TDD. In other words, my error > rate has remained rather consistent but the time between creating and > fixing a bug goes from never/months/weeks/days/hours to seconds. His work also involves creating unit tests for everything he writes, so I have assumed he uses TDD at least to some extent (with D=Development, not Design - side note to Mr Flibble). But coming to think of that I'm not so sure any more. Maybe he considers a failing test as a personal insult even if no one else sees it, and does not dare to run the test before he is 100% sure it will succeed. |
| Intelli2 <intelli2@mama.com>: Apr 07 09:35AM Post in violation of terms-of-service cancelled by Sir Cancelot <cancelbot@eternal-september.org> From: Intelli2 <intelli2@mama.com> Subject: Re: The Scalable and lock-free first-in-first-out queue implementation of Mark Moir, Ori Shalev, Nir Shavit is patented Message-ID: <otar18$dp3$1@dont-email.me> Newsgroups: comp.lang.c++ |
| You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment