Large scale C++ software design, by John Lakos - people any good
recommendations to this book? 28 2420
Definitely worthwhile. /david :-)
davidru...@warp mail.net wrote: Definitely worthwhile. /david :-)
Yep, I second that. :)
-shez-
puzzlecracker wrote: Large scale C++ software design, by John Lakos - people any good recommendations to this book?
This book was published in 1996
and contains a lot of obsolete advice.
For example, Chapter 2 Ground Rules,
Section 5 Redundant Include Guards, page 85,
Minor Design Rule
Place a redundant (external) include guard
around each preprocessor include directive
in every header file.
Today, we expect the C preprocessor to remember
idempotent header files and read them only once.
E. Robert Tisdale wrote: puzzlecracker wrote:
Large scale C++ software design, by John Lakos - people any good recommendations to this book?
This book was published in 1996 and contains a lot of obsolete advice. For example, Chapter 2 Ground Rules, Section 5 Redundant Include Guards, page 85,
Minor Design Rule Place a redundant (external) include guard around each preprocessor include directive in every header file.
Today, we expect the C preprocessor to remember idempotent header files and read them only once.
what would you supplement this book with? Any viable alternatives or
construction suggestions that would go on par with this book?
I would personally recommend Meyers, Dewhurst, and various books by
Sutter. However, none of these really address physical design in the
way that Lakos does.
E. Robert Tisdale wrote: This book was published in 1996 and contains a lot of obsolete advice. For example, Chapter 2 Ground Rules, Section 5 Redundant Include Guards, page 85,
Minor Design Rule Place a redundant (external) include guard around each preprocessor include directive in every header file.
Today, we expect the C preprocessor to remember idempotent header files and read them only once.
What are you talking about? Is that specified in standard C++? Does
the following code compile for you?
blah.h
------
int somefunction() { return 9; }
blah.cpp
--------
#include <iostream>
#include "blah.h"
#include "blah.h"
int main() { std::cout << somefunction() << std::endl; }
I tried it on gpp and got "error: redefinition of 'int
somefunction()' ". If it compiles for you, I'd really like to know what
compiler you're using.
Thanks,
-shez-
"Shezan Baig" <sh************ @gmail.com> wrote... E. Robert Tisdale wrote: This book was published in 1996 and contains a lot of obsolete advice. For example, Chapter 2 Ground Rules, Section 5 Redundant Include Guards, page 85,
^^^^^^^^^ Minor Design Rule Place a redundant (external) include guard
^^^^^^^^ around each preprocessor include directive in every header file.
Today, we expect the C preprocessor to remember idempotent header files and read them only once. What are you talking about?
He is talking about advice John Lakos gave in his book.
Is that specified in standard C++?
Why should that matter? The Standard doesn't specify any
design guidelines nor does it say what features of a C++
compiler make a better competitor on today's market. If
the preprocessor remembers what headers it has already
included, the redundant guards become unnecessary.
Does the following code compile for you?
blah.h ------ int somefunction() { return 9; }
blah.cpp -------- #include <iostream> #include "blah.h" #include "blah.h"
int main() { std::cout << somefunction() << std::endl; }
I tried it on gpp and got "error: redefinition of 'int somefunction()' ". If it compiles for you, I'd really like to know what compiler you're using.
No, what you presented here will certainly not compile.
However, if you add
#pragma once
to 'blah.h', some modern compilers will not preprocess it
again. The existence of 'once' pragma makes *external*
include guards unnecessary.
V
These small details are less important compared to the overall
methodology presented in the book. The main point is to recognize that
physical design is a separate problem from logical design, and then to
learn how to implement a physical design.
Victor Bazarov wrote: However, if you add
#pragma once
to 'blah.h', some modern compilers will not preprocess it again. The existence of 'once' pragma makes *external* include guards unnecessary.
That worked! Cool, thanks!
-shez- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Constandinos Mavromoustakis |
last post by:
CFP: CLADE 2004-Challenges of Large Applications in Distributed
Environments
-------------------------------------------------
PhD student - Dept.Informatics at Aristotle University of Thessaloniki
URL-> http://agent.csd.auth.gr/~cmavrom
--------------------------------------------------
-------------------------CLADE 2004---------------------------
Challenges of Large Applications in Distributed Environments
June 7th, 2004, Honolulu,...
|
by: Andrea Griffini |
last post by:
I did it.
I proposed python as the main language for our next CAD/CAM
software because I think that it has all the potential needed
for it. I'm not sure yet if the decision will get through, but
something I'll need in this case is some experience-based set
of rules about how to use python in this context.
For example... is defining readonly attributes in classes
worth the hassle ? Does duck-typing scale well in complex
|
by: Kymert persson |
last post by:
Hi.
I was wondering if there are any more C++ books along the lines of
"Large scale C++ software design" by Lakos, J. I.e. concerning larger
design issues in close relation to C++. I have made a fairly thorough
literature search, but i haven't found anything fitting this criteria.
In general there seems to be a huge amount concerning the C++ language as
such and more "narrow" design issues, e.g. along the lines of Meyers
Effective-
|
by: Steven T. Hatton |
last post by:
Is there a more or less accepted authority describing how to structure a
project? I know Julie has asked about namespaces. That is certainly a
part of my question, but I want to know about the whole picture.
If such a thing doesn't exist, then would someone with enough name
recognition to have an influence please decree such a guideline. I'd be
happy to simply be able to say my project is organized in accordance with
the ...
|
by: Da~One |
last post by:
This message has been posted to 2 groups, one to the VB.NET group, and the
other to C#.
I am trying to decide which language to commit to for a large scale project.
I am looking for the input of people who have gone through this process
before.
I am currently leaning towards C# solely because I envision VB.NET slowing
down exponentially as projects are added with the constant background
compilation.
| |
by: al.cpwn |
last post by:
I recently bought this book, and wanted some recommendations on what
are the most important lessons one should learn from this book. i.e.
something that comes up frequently in large C++ based designs and will
be useful to me over and over again. I am an undergrad student so I
don't run into problems involving large projects (as I have never
worked on one) but would nevertheless like to learn the principles so
that if I am hired to work on...
|
by: marktxx |
last post by:
I've finally gotten around to reading the book "Large-Scale C++
Software Design" by John Lakos.
Has anyone documented what parts of this book are now obsolete due to
C++ language changes such as namespaces? or are now generally
considered bad advice?
Feel free to reply here on a particular topic discussed in the book.
I also noticed that John Lakos has a book in preparation called
"Scalable C++: Component-Based Development" maybe this...
|
by: razael1 |
last post by:
Does anyone know of a good article dealing with organizing large class
heirarchies? I've always had trouble with circular dependencies,
global constants and variables, etc. Thanks.
|
by: Jesse Burns |
last post by:
I'm about to start working on my first large scale site (in my opinion) that
will hopefully have 1000+ users a day. ok, this isn't on the google/facebook
scale, but it's going to be have more hits than just family and friends.
Either way, I'm planning on this site blowing up once I have enough of a
feature set, so I'm concerned about performance and scalability in the long
run.
I've worked for a software company, but I've never...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |