From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a402d78988bdf2b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-20 18:19:52 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny03.gnilink.net.POSTED!0e8a908a!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [announcement] SYSAPI and SYSSVC for Windows References: <1071846912.728815@master.nyc.kbcfp.com> <1071852533.241196@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 21 Dec 2003 02:19:51 GMT NNTP-Posting-Host: 162.84.192.162 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny03.gnilink.net 1071973191 162.84.192.162 (Sat, 20 Dec 2003 21:19:51 EST) NNTP-Posting-Date: Sat, 20 Dec 2003 21:19:51 EST Xref: archiver1.google.com comp.lang.ada:3650 Date: 2003-12-21T02:19:51+00:00 List-Id: Ekkehard Morgenstern wrote: > Yeah, say, you have hundreds of classes that use pointers. If you have them, then you already have code that deals with them. If you are having to deal with an existing bad design, then you have a bunch of work ahead of you to fix it. But "hunfreds of classes that use pointers" doesn't just happen, someone bad was responsible for creating them. > This is something that is elegantly solved in Ada with the access type. > You simply assign and Ada keeps track of the reference. Say what? An access type is a pointer, nothing more. Ada doesn't keep track of anything! (Well, if the storage pool goes out of scope, or soemthing like that, I think Ada frees all the memory in the pool, but I don't think that's what you're talking about.) > Or are there other ways to do that that I'm unaware of? As I said above, I think you are extremely confused about what Ada does when you copy access types. > But if all your classes depend on pointers, then you have to write > copy assignment and copy constructor for all of your classes, > no matter whether you use smart pointers. Your classes should not depend upon pointers (unless none of them own the memory, so that simply copying the pointer is OK). If an object owns the memory that its member pointer is addressing, then the pointer should be wrapped up in a smart pointer that will orchestrate the copying policy. Then the class containing that smart pointer doesn't need a copy constructor or assignment operator to be user-written. The compiler- generated one will work properly. And you don't have to write your own smart pointers. Just go to Boost and use one of theirs. > For not permitting string literals or floating-point values in > templates, there's no excuse, really. > These values are not uncomparable per se, a distinct string constant > or a distinct floating-point value is still distinct. Template parameters can be expressions. Allowing floating point parameters would require discussing the issue of whether x<1.0> and x<1.0/3.0 + 1.0/3.0 + 1.0/3.0> are the same type or not. It's doable, but there's enough work involved that they just punted. Template parameters which are addresses are supposed to be of objects with external linkage, which string literals are not. Instead of x<"joe"> you can do char joe[] = "joe"; x; > What is a "template method of a class" for you? > Something like > class X { > template void func( ... ); > }; Yes, exactly. Such a member function template cannot be virtual. > Or some other rule. Think of what you're asking - you want people to devote time to complicated rules about when jumping into the middle of a scope is legal. If you push them enough, they would just outlaw it altogether! > My Ada development-system will have its own database engine and hence > project management will be a piece of cake. Plus, it will probably be > freeware or shareware or open-source. Well, there's already a free-software Ada compiler. Why don't you just use it as a base for your work instead of trying to recreate all the knowledge that has gone into making it what it is? A fundamental mistake made by many programmers is to believe that they can "do it better". They fail to realize that an existing system may be large and complicated because it has been modified to handle complex issues and problems that they do not know about. It's like evolution. The process of modifying software breeds instincts and behavior into the code which represents internalized and implicit knowledge of the world. A new project won't have that. What you will need to do most of all is to start with small projects which immediately work and do something useful. If you begin with anything huge you will never complete it. > The programming language isn't what matters. All that matters is the > OS concept itself, whether it will be successful. All that matters is the execution - the OS must deliver what it promises. Microkernels are a great OS concept, but they have failed to be the base of a successful OS. > Since my project (DELOS) is only my own endeavour so far, I don't think > it'll have any impact on the software industry. Yeah, that's what Linus thought! > Well, you'd be surprised how fast I learn. ;) No matter how fast you learn, it takes a good long while before it seeps into your bones.