Click here to Skip to main content
15,888,401 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: A server to communicate with a robot Pin
Keld Ølykke4-Jan-15 12:42
Keld Ølykke4-Jan-15 12:42 
AnswerRe: A server to communicate with a robot Pin
manoranjan10-Jan-15 11:22
manoranjan10-Jan-15 11:22 
QuestionNever use pure built in types Pin
D4rkTrick11-Dec-14 6:23
professionalD4rkTrick11-Dec-14 6:23 
AnswerRe: Never use pure built in types Pin
Richard MacCutchan11-Dec-14 6:43
mveRichard MacCutchan11-Dec-14 6:43 
GeneralRe: Never use pure built in types Pin
D4rkTrick21-Dec-14 8:18
professionalD4rkTrick21-Dec-14 8:18 
AnswerRe: Never use pure built in types Pin
den2k8811-Dec-14 7:37
professionalden2k8811-Dec-14 7:37 
GeneralRe: Never use pure built in types Pin
jschell12-Dec-14 12:29
jschell12-Dec-14 12:29 
GeneralRe: Never use pure built in types Pin
den2k8814-Dec-14 0:09
professionalden2k8814-Dec-14 0:09 
jschell wrote:
Maybe you are thinking of replacing every type with a class rather than just simple type?

Precisely - otherwise it has little sense if not to allow further modifications to the API, as time_t that can expand either to _time32_t or _time64_t (I have no code at hand so I may be making some naming error but i trust it is inteligible).

As I was saying, this is useful if you provide APIs and want to keep the interface changes at the bare minimum, internally it has no sense.


jschell wrote:
If a class only has a single data member and that data member is an int then the most efficient compiler optimization would be to allocate storage for just the int.

Never rely on compiler optimizations unless you can force them, undertand them completely and enable/disable them at will for every single block of code inside the code itself - and then prepare to fight hard when you upgrade the compiler to a new version (yes, we're still using VS6 for that reason, and it's all out of support, like one day will be VS2008, the one which is our "future").

Using classes with only one data member in the inner working of a component is overkill at best, makes debugging much more convoluted. Classes IMHO should be used to express composite concepts where the single data members may change but leaving externally the same interface. One class per type is really messy.

Of course none of the above are destructive problems, these are only the reasons for which I, with my small luggage of experience and my viewpoint, wouldn't use this design pattern unless it is prove to be the most effective way in some context. Cool | :cool:
Geek code v 3.12
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- r++>+++ y+++*
Weapons extension: ma- k++ F+2 X

GeneralRe: Never use pure built in types Pin
jschell16-Dec-14 12:37
jschell16-Dec-14 12:37 
AnswerRe: Never use pure built in types Pin
jschell12-Dec-14 12:26
jschell12-Dec-14 12:26 
GeneralRe: Never use pure built in types Pin
D4rkTrick21-Dec-14 8:17
professionalD4rkTrick21-Dec-14 8:17 
QuestionHow to avoid backend stored procedures Pin
nstk8-Dec-14 21:24
nstk8-Dec-14 21:24 
JokeRe: How to avoid backend stored procedures Pin
Brady Kelly12-Dec-14 5:52
Brady Kelly12-Dec-14 5:52 
AnswerRe: How to avoid backend stored procedures Pin
Eddy Vluggen12-Dec-14 7:27
professionalEddy Vluggen12-Dec-14 7:27 
AnswerRe: How to avoid backend stored procedures Pin
Dominic Burford23-Dec-14 1:35
professionalDominic Burford23-Dec-14 1:35 
QuestionRearchitecting BackgroundWorker based to Task based? Pin
Matt T Heffron17-Nov-14 12:49
professionalMatt T Heffron17-Nov-14 12:49 
AnswerRe: Rearchitecting BackgroundWorker based to Task based? Pin
Richard Deeming18-Nov-14 2:45
mveRichard Deeming18-Nov-14 2:45 
AnswerRe: Rearchitecting BackgroundWorker based to Task based? Pin
Gerry Schmitz18-Nov-14 7:00
mveGerry Schmitz18-Nov-14 7:00 
QuestionRemote Desktop Connection Pin
Non Sequitur11-Nov-14 3:43
Non Sequitur11-Nov-14 3:43 
SuggestionRe: Remote Desktop Connection Pin
ZurdoDev11-Nov-14 5:27
professionalZurdoDev11-Nov-14 5:27 
AnswerRe: Remote Desktop Connection Pin
Pete O'Hanlon11-Nov-14 5:57
mvePete O'Hanlon11-Nov-14 5:57 
QuestionWhat is an architect for? Pin
Member 448708318-Oct-14 10:19
Member 448708318-Oct-14 10:19 
JokeRe: What is an architect for? Pin
Vivi Chellappa18-Oct-14 18:43
professionalVivi Chellappa18-Oct-14 18:43 
AnswerRe: What is an architect for? Pin
kimpetwangi25-Oct-14 17:12
kimpetwangi25-Oct-14 17:12 
AnswerRe: What is an architect for? Pin
Richard MacCutchan18-Oct-14 21:22
mveRichard MacCutchan18-Oct-14 21:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.