forophobia
-
paulb wrote: slack-jawed imbecile who only knows C# and is asked to maintain my C++ code. Most VB C# programmers wouldn't come near any C++ code - they are too afraid of pointers. Pointers bite, you know.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
>Most VB C# programmers :mad: Let us not start more idiotic prejudice based on language choice eh. regards, Paul Watson Bluegrass South Africa Christopher Duncan wrote: "I always knew that somewhere deep inside that likable, Save the Whales kinda guy there lurked the heart of a troublemaker..." Crikey! ain't life grand?
-
>Most VB C# programmers :mad: Let us not start more idiotic prejudice based on language choice eh. regards, Paul Watson Bluegrass South Africa Christopher Duncan wrote: "I always knew that somewhere deep inside that likable, Save the Whales kinda guy there lurked the heart of a troublemaker..." Crikey! ain't life grand?
Paul Watson wrote: more idiotic prejudice based on language choice eh Hey, hey, hey! This is SoapBox. Why are political, religious and sexual prejudices better than programming ones? I have no opinion on gay marriages or affirmative action (whatever that is), so I am excluded from SoapBox? More programming rants to the people. :cool:
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
Paul Watson wrote: more idiotic prejudice based on language choice eh Hey, hey, hey! This is SoapBox. Why are political, religious and sexual prejudices better than programming ones? I have no opinion on gay marriages or affirmative action (whatever that is), so I am excluded from SoapBox? More programming rants to the people. :cool:
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-
Just read Andrew parkers nice boost intro. One sentence triggered a "prtogramiming question", with a line of thought better suited to this board: minimising the amount of times that users have to write their own loops Hello? Are we programmers or what? Look the framework we have to build to minimise (not remove, just "minimise") writing loops: iterators. const. unidirectional. bidirectional. reverse iterators. const or not. iterator adaptor. functors. binders. composers. bind. function. lambda library. anything I forgot? most likely. We need to templatize like hell, bending the compiler to a point where we are happy it makes it through our code alive - and when not, we don't dare ask for sensible error messages. To avoid what?
// deprecated, don't use:
// for(int i=0; iI tell you what: unless I can write
count_if(container, element > 0)
I stick with my loops.
Where does this fear come from? It looks like everybody is ooohing and aaahing the marvelous insights into the human being Dr Freud opened up for all of us, wondering how we could live without it so long, before noticing that he's a serious whacko who needs some true job instead of a leather couch.
I suspect one of the guys who miffed up the STL was seriously loopophobic. maybe his wife left him because of a loop. Maybe his child died in his arms because he was off by one. Maybe he saw his sister nekkid in the woods when he was five. We don't know. But he had something going. What would be necessary to eliminate loops? At least most of them? Mark them evil?
The recent round of job interviews - complete with "write some code please": the majority rather try to remember an omnious function they once heard of (or just make one up that doesn't exist), instead of touching a for loop.
It's a loop, for god's sake. It's not a bear trap, it's not the infamous goto-spaghetti mess, it's not a terrorist nuke we have to keep out of our code whatever sacrifice of sanity is necessary.
What can go wrong in a loop?
- you forget to increment
- you are off by one
- you invalidate the container or the iterator
The first requires some discipline, the second some basic calculus training, and the third heaven forbid thinking! whoo!
How many algorithms can you think of using a loop? Ten? Tenthousand? Guys, generalize looping, not the algorithm.
Introducing a generic container iteration syntax ("a container to be iterable must have b
Yeah that's my impression, too. This seems to be complexity for complexity's sake, or possibly just to distance itself from anything obvious non-STL. ----------------------------- All truth passes through 3 stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident.
-
for loops are way too readable, the whole purpose of STL and especially Boost is to enable the production of completely unreadable code that will utterly confuse the slack-jawed imbecile who only knows C# and is asked to maintain my C++ code. I plan to leave behind a legacy that will cause tears of frustration and untold misery in the so-called "programmers" of tommorrow.
paulb wrote: for loops are way too readable Not if you do something like this :-D
#include <iostream> using namespace std; int arr[] = {3, 4, 2, 5, 1, 9, 0, 8, 7, 6 }; for(int i=((signed)sizeof(arr)/-(signed)sizeof(arr[0]));cout<
* * * Ian Darling [The world is a thing of utter inordinate complexity ... that such complexity can arise ... out of such simplicity ... is the most fabulous extraordinary idea ... once you get some kind of inkling of how that might have happened - it's just wonderful ... the opportunity to spend 70 or 80 years of your life in such a universe is time well spent as far as I am concerned](http://www.edge.org/documents/adams_index.html) - Douglas Adams
-
Just read Andrew parkers nice boost intro. One sentence triggered a "prtogramiming question", with a line of thought better suited to this board: minimising the amount of times that users have to write their own loops Hello? Are we programmers or what? Look the framework we have to build to minimise (not remove, just "minimise") writing loops: iterators. const. unidirectional. bidirectional. reverse iterators. const or not. iterator adaptor. functors. binders. composers. bind. function. lambda library. anything I forgot? most likely. We need to templatize like hell, bending the compiler to a point where we are happy it makes it through our code alive - and when not, we don't dare ask for sensible error messages. To avoid what?
// deprecated, don't use:
// for(int i=0; iI tell you what: unless I can write
count_if(container, element > 0)
I stick with my loops.
Where does this fear come from? It looks like everybody is ooohing and aaahing the marvelous insights into the human being Dr Freud opened up for all of us, wondering how we could live without it so long, before noticing that he's a serious whacko who needs some true job instead of a leather couch.
I suspect one of the guys who miffed up the STL was seriously loopophobic. maybe his wife left him because of a loop. Maybe his child died in his arms because he was off by one. Maybe he saw his sister nekkid in the woods when he was five. We don't know. But he had something going. What would be necessary to eliminate loops? At least most of them? Mark them evil?
The recent round of job interviews - complete with "write some code please": the majority rather try to remember an omnious function they once heard of (or just make one up that doesn't exist), instead of touching a for loop.
It's a loop, for god's sake. It's not a bear trap, it's not the infamous goto-spaghetti mess, it's not a terrorist nuke we have to keep out of our code whatever sacrifice of sanity is necessary.
What can go wrong in a loop?
- you forget to increment
- you are off by one
- you invalidate the container or the iterator
The first requires some discipline, the second some basic calculus training, and the third heaven forbid thinking! whoo!
How many algorithms can you think of using a loop? Ten? Tenthousand? Guys, generalize looping, not the algorithm.
Introducing a generic container iteration syntax ("a container to be iterable must have b
-
>Most VB C# programmers :mad: Let us not start more idiotic prejudice based on language choice eh. regards, Paul Watson Bluegrass South Africa Christopher Duncan wrote: "I always knew that somewhere deep inside that likable, Save the Whales kinda guy there lurked the heart of a troublemaker..." Crikey! ain't life grand?
-
peterchen wrote: What can go wrong in a loop? Well, apparently it was a loop that brought CP to its knees a few weeks ago. :-D Marc Microsoft MVP, Visual C# MyXaml MyXaml Blog Hunt The Wumpus RealDevs.Net
-
Not if you make a habit of writing the loop including the increment before you write any other code. Sure, it has happened, but it's not that often, and it's quite easy to find the problem. -- Denn du bist, was du isst! Und ihr wisst, was es ist! Es ist mein Teil...?
-
Just read Andrew parkers nice boost intro. One sentence triggered a "prtogramiming question", with a line of thought better suited to this board: minimising the amount of times that users have to write their own loops Hello? Are we programmers or what? Look the framework we have to build to minimise (not remove, just "minimise") writing loops: iterators. const. unidirectional. bidirectional. reverse iterators. const or not. iterator adaptor. functors. binders. composers. bind. function. lambda library. anything I forgot? most likely. We need to templatize like hell, bending the compiler to a point where we are happy it makes it through our code alive - and when not, we don't dare ask for sensible error messages. To avoid what?
// deprecated, don't use:
// for(int i=0; iI tell you what: unless I can write
count_if(container, element > 0)
I stick with my loops.
Where does this fear come from? It looks like everybody is ooohing and aaahing the marvelous insights into the human being Dr Freud opened up for all of us, wondering how we could live without it so long, before noticing that he's a serious whacko who needs some true job instead of a leather couch.
I suspect one of the guys who miffed up the STL was seriously loopophobic. maybe his wife left him because of a loop. Maybe his child died in his arms because he was off by one. Maybe he saw his sister nekkid in the woods when he was five. We don't know. But he had something going. What would be necessary to eliminate loops? At least most of them? Mark them evil?
The recent round of job interviews - complete with "write some code please": the majority rather try to remember an omnious function they once heard of (or just make one up that doesn't exist), instead of touching a for loop.
It's a loop, for god's sake. It's not a bear trap, it's not the infamous goto-spaghetti mess, it's not a terrorist nuke we have to keep out of our code whatever sacrifice of sanity is necessary.
What can go wrong in a loop?
- you forget to increment
- you are off by one
- you invalidate the container or the iterator
The first requires some discipline, the second some basic calculus training, and the third heaven forbid thinking! whoo!
How many algorithms can you think of using a loop? Ten? Tenthousand? Guys, generalize looping, not the algorithm.
Introducing a generic container iteration syntax ("a container to be iterable must have b