« first day (1600 days earlier)      last day (3347 days later) » 

10:01 AM
@AndyProwl derp. If there's /one/ benefit of using a function over if (a < b) std::swap(a, b); then it would be the opportunity to be more specific about such types. But "There is no hint that flexibility of different types is necessary" doesn't follow from the original code :)
 
@sehe It's actually a bunch of smaller projects that (together with their unit test projects) have ~3kLoC. One could inspect the code one project at a time.
 
@Bartek It resurrected
 
@AndyProwl so that's... 1kLoc? Could still be pretty steep. Depends a lot on the kind of code (if it's all library code, forget it. If it's a typical WinForms or .NET MVC app, wokay)
 
@sehe it's not exactly library code, but not even WinForms stuff. It's C++. It's basically a data model with some business logic. But anyway I think I got it, my colleagues are probably right.
@sehe What do you mean by "be more specific about such types"? The benefit of a function is to eliminate duplication and improve readability. A non-generic function can do that just fine. As long as a and b always have type X, I would not bother to make the function parametric on the types; and if the comparison criterion is always the same, I would not bother to make the function parametric on the comparer. Genericity is cool but not at the price of unnecessary additional complexity.
 
Reminds me of this gag: "IDEs make doing the wrong thing easier". Here, we see the programmer automating the wrong thing. At the cost of fragmenting the domain with many levels of "accidental" abstraction. You want to avoid this. See Raabe's answer. — sehe 28 secs ago
@AndyProwl The restrictions on a/b are not stated anywhere in the original code. Just imagine what happens if a or b gets changed to unsigned type. (It might actually break, but other similar such lines might continue compiling, just no longer doing "the obvious")
 
10:11 AM
@sehe Then unit tests should catch the problem
 
@AndyProwl I think you completely missed my point there.
@AndyProwl ... such a copout. This reasoning excuses any code style
 
@sehe No, it does not. It just allows you to not introduce unnecessary complexity until you need it.
 
@sehe So what's the recommended approach in this situation, use type_traits?
 
....
I'm completely amazed at the capability/willingness of loungers to completely invert one's intention. I'm going to have to assume it's for amusement. A.k.a. trolling
 
@sehe Nooooo
 
10:14 AM
@sehe Huh? Are you implying I'm trolling you?
 
Andy Trowl
 
lol
 
(That was an honest question I just asked, no trolling intended)
 
also, it would be healthy to question whether you've been clear enough to not be misunderstood
 
@AndyProwl Not just you. But, yeah, since you seem to picking on exactly the points I'm not advocating...
I was pointing out that if you want to factor if (a < b) std::swap(a, b); (that's a big IFFFFF!) then realistically you /have to/ realize that unless you make a and b generically typed you're changing the meaning. And I stressed that this is precisely one good reason to perhaps consider the factoring.
 
10:16 AM
lol sehe preparing two messages and copy pasting
 
It's objective fact that if (a < b) std::swap(a, b); is already overly generic.
 
Objective fart
 
@ParkYoung-Bae Not even. I was preparing a single message. Then taking the time to read the messages received in the mean time first. You'll note that there's no actual relation between those two messages (I wrote the second one before I read the two responses by you and Andy)
 
@BartekBanachewicz Hm?
 
@sehe Why so defeeeeensiiiiiive
 
10:17 AM
How about std::swap(a, a < b ? b : a); for fun and inefficiency?
 
@ParkYoung-Bae Because you start with "lol". It's not funny because the premise was wrong
 
lol sehe
chill
 
@FredOverflow Post it as an answer :)
 
Na, I want to keep my trolling to the Lounge.
 
@FredOverflow I am sure you can find this in real code somewhere :D
 
10:19 AM
@ParkYoung-Bae :/ "lol ParkYoung-Bae telling people to chill" ?
 
lol why not
 
@sehe I'm lost. I'm probably not clever enough to discuss stuff with you.
And I don't feel like arguing either
 
I wouldn't even know what about. AFAICT we're agreeing. I was just baffled by the fact that you keep picking nits at what I said. Perhaps I said it clumsily.
In general I do think there is predilection in the lounge to find fault with anything anyone says. A culture of out-witting, if you will. And I cannot help but suspect it was at play here, again
And I cannot help but suspect it was at play here, again (this struck me when Rerito jumped in)
 
What have I done?!
 
Nothing. Well, nothing you didn't know about. Linked it for your convenience
 
10:25 AM
Did you took my question as some sort of troll?
 
What else was it?
 
Ok, I'll explain then
 
@sehe What about? Basically the choice you gave is "either you're trolling me, or I'm amazed by how much you people are incapable of understanding me". Assuming honesty would imply too few brain cells.
 
Informed curiosity? I mean, it seems so much over the top for the topic we were discussing :)
 
I was not nitpicking. I thought you were providing arguments against what I wrote, so I tried to expand on my point.
 
10:27 AM
@Jefffrey I forgot
 
@sehe When reading the whole discussion, I wondered "what can be done to make the stuff OK", and I thought of using type_traits. Since I'm not experienced as near as most of you here, I just asked to confirm if I was on the right track
 
@AndyProwl False dichotomy :/ (Also fair criticism in your summary of my complaints in the last 5 minutes... I was wording it emotionally. But see here for what I actually want to distill from this)
 
@BartekBanachewicz Forgot what you wanted to say?
 
after all, to my "I would not use a default argument" you replied "But then it should take a comparer, defaulting to std::less<>?". That was confusing to me. I had to interpret it like you didn't agree with my explanation or something and tried to elaborate
 
sehe is having a bad day
5
 
10:28 AM
Thank you Park
 
But srsly I would expect from mature adults like you to not spend that much time on a sterile argument
 
@Jefffrey ye
 
Hate?
 
might be
I had this vague feeling of something I wanted to tell you
w/e
 
@AndyProwl ah. I couldn't figure out why this was a "quotation" ... Now I get that. It's the imperfections of reply to arrows. I never meant to respond to that isolated detail. I was just thinking aloud about extracting the statement to a function. In general. (Point being that doing so necessitates/enables quite a few constraints/design choices. Which might be a reason to do the -otherwise sterile- extraction)
(My response was to the entire block more or less)
 
10:33 AM
3 mins ago, by Park Young-Bae
But srsly I would expect from mature adults like you to not spend that much time on a sterile argument
 
You underestimate the human desire to make a connection
 
@sehe Yes, I do recognize that culture, and I learned not to take it personally and appreciate it. I am sometimes contributing to it admittedly, but I mostly do that playfully. I wasn't doing that now, it was honest misunderstanding or lack of understanding (which still goes on, but really that does not matter).
 
@ParkYoung-Bae Another thing mature adults do is to try to reconcile their disagreements.
 
I can feel the sarcasm
 
Not with jalf though
 
10:34 AM
That explains the exploding divorce rate
 
And dissolve misunderstandings
 
ISIS is doing a pretty good job at reconciling their disagreements with the West
 
@LightnessRacesinOrbit Witty one
 
fuck
fuck fuck fuck
 
more
 
10:35 AM
not today thankyou
 
Not now
 
@BartekBanachewicz I have a headache
 
So what
 
perhaps tomorrow?
 
@BartekBanachewicz Are you testing whether your favourite fuck flagger is lurking?
 
10:36 AM
@sehe /cc @Lightness
 
@ParkYoung-Bae what?
 
Yeah he is
 
@ParkYoung-Bae ... not nice
 
Oh my god someone is being not nice in the Lounge
 
10:40 AM
@ParkYoung-Bae Are you honing your ballbusting skills?
 
@sehe no I fucked up my taxes
 
death and fuck ups
 
@Rerito Not on sehe!
 
I've got the perfect training for you
 
@ParkYoung-Bae just be glad someone is surprised if it's you :/ (you already observed I was having a bad day. No need to force a collision with LRIO for some reason unbeknownst to me)
 
10:44 AM
@sehe Oh you weren't targetted, only LRiO :)
(Our favourite fuck flagger)
 
Really. Interesting. I have no such information
 
what!!
I don't flag
 
prove it
 
Something something mature adults.
 
inb4 yourlogicalfallacy
 
10:46 AM
ttttt i'm getting there, wait wait
 
@R.MartinhoFernandes Can a man (as male human being) ever be mature?
 
It can certainly be ripe (see Gaben)
 
Just to be sure, I hope I defused our earlier misunderstanding @sehe
 
@Corey I've expanded my answer with some more information including a demo that shows how you might use multi_array_ref to get in-place element construction going. Remember: premature optimization is at the root of all evil :) — sehe 50 secs ago
@Rerito Hmm? It's possible I ignored something you said :) If that counts, then, yes it's defused o.O
 
@Rerito agreed here. I was pondering whether to thank you or Robot for supporting my position on that.
@AndyProwl Sometimes it catches me out. I'm weak :)
And I need to run to school to get the kids. Bye
 
26 mins ago, by Rerito
@sehe When reading the whole discussion, I wondered "what can be done to make the stuff OK", and I thought of using type_traits. Since I'm not experienced as near as most of you here, I just asked to confirm if I was on the right track
 
@sehe Happens :) Cheers
 
My power went out for 6 hours.
8 PM to 4 AM.
 
10:58 AM
I couldn't sleep, albeit I tried from 2 AM to 4 AM now.
 
"albeit" misuse detected
 
pedant mode triggered
 
@LightnessRacesinOrbit yeah yeah fuck you
 

« first day (1600 days earlier)      last day (3347 days later) »