Click here to Skip to main content
14,336,226 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: This isn't good... Pin
abmv1-Sep-19 5:51
professionalabmv1-Sep-19 5:51 
GeneralRe: This isn't good... Pin
Mark_Wallace1-Sep-19 7:25
memberMark_Wallace1-Sep-19 7:25 
GeneralRe: This isn't good... Pin
kmoorevs1-Sep-19 7:40
memberkmoorevs1-Sep-19 7:40 
GeneralRe: This isn't good... Pin
honey the codewitch1-Sep-19 8:08
memberhoney the codewitch1-Sep-19 8:08 
GeneralRe: This isn't good... Pin
kmoorevs2-Sep-19 4:15
memberkmoorevs2-Sep-19 4:15 
GeneralRe: This isn't good... Pin
honey the codewitch2-Sep-19 4:18
memberhoney the codewitch2-Sep-19 4:18 
GeneralRe: This isn't good... Pin
honey the codewitch1-Sep-19 8:05
memberhoney the codewitch1-Sep-19 8:05 
GeneralA Programming Philosophy Question Pin
Richard Andrew x6431-Aug-19 13:31
professionalRichard Andrew x6431-Aug-19 13:31 
So I'm perusing through an STL cookbook. I never learned the C++ STL, so I thought I'd like to try.

So I'm expecting to see good OO design principles in play here. But I find that to sort a vector, you don't simply call a Sort() method on the vector, you need to call a stand-alone function and pass it the vector, sort(begin(v), end(v)).

As a matter of fact, a whole cadre of things you would want to do with STL objects are accomplished by calling these external, stand-alone functions.

What kind of design is this? This feels a lot more like C than C++.

Why was it designed this kooky way?



The difficult we do right away...
...the impossible takes slightly longer.

GeneralRe: A Programming Philosophy Question Pin
Maximilien31-Aug-19 14:30
memberMaximilien31-Aug-19 14:30 
GeneralRe: A Programming Philosophy Question Pin
Richard Andrew x6431-Aug-19 14:53
professionalRichard Andrew x6431-Aug-19 14:53 
GeneralRe: A Programming Philosophy Question Pin
Amarnath S31-Aug-19 15:21
professionalAmarnath S31-Aug-19 15:21 
GeneralRe: A Programming Philosophy Question Pin
KateAshman1-Sep-19 22:21
memberKateAshman1-Sep-19 22:21 
GeneralRe: A Programming Philosophy Question Pin
obermd2-Sep-19 5:42
memberobermd2-Sep-19 5:42 
GeneralRe: A Programming Philosophy Question Pin
Gary Wheeler3-Sep-19 1:17
memberGary Wheeler3-Sep-19 1:17 
GeneralRe: A Programming Philosophy Question Pin
honey the codewitch31-Aug-19 17:45
memberhoney the codewitch31-Aug-19 17:45 
GeneralRe: A Programming Philosophy Question Pin
Grober_31-Aug-19 23:02
memberGrober_31-Aug-19 23:02 
GeneralRe: A Programming Philosophy Question Pin
Chris Losinger1-Sep-19 3:34
professionalChris Losinger1-Sep-19 3:34 
GeneralRe: A Programming Philosophy Question Pin
KateAshman1-Sep-19 21:39
memberKateAshman1-Sep-19 21:39 
GeneralRe: A Programming Philosophy Question Pin
Richard Andrew x642-Sep-19 4:07
professionalRichard Andrew x642-Sep-19 4:07 
GeneralRe: A Programming Philosophy Question Pin
NotJosh2-Sep-19 19:18
memberNotJosh2-Sep-19 19:18 
GeneralHappy coding. Pin
honey the codewitch31-Aug-19 12:28
memberhoney the codewitch31-Aug-19 12:28 
GeneralSeems about right Pin
Jörgen Andersson31-Aug-19 9:54
protectorJörgen Andersson31-Aug-19 9:54 
GeneralRe: Seems about right Pin
OriginalGriff31-Aug-19 19:49
protectorOriginalGriff31-Aug-19 19:49 
GeneralRe: Seems about right Pin
Jörgen Andersson31-Aug-19 21:42
protectorJörgen Andersson31-Aug-19 21:42 
GeneralRe: Seems about right Pin
OriginalGriff31-Aug-19 21:57
protectorOriginalGriff31-Aug-19 21:57 

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.