Question: @exbigboss how would generics solve that issue?

Asked By
Asked At
2017-10-10 22:17:33

Found 15 possible answers.

User Answered At Possible Answer
buddhamagnet 2017-10-10 22:17:37 I’d go to another restaurant, or use a knife
exbigboss 2017-10-10 22:17:46 In C++ you can forward variadic templates So you’d just write something that simply forwards the arguments to the overloaded function
dlsniper 2017-10-10 22:18:14 not really, would it two accept string and one ...string since the other functions have well declared argument types
exbigboss 2017-10-10 22:18:54 Yeah, I’m actually not sure what that code was doing but it looks awful
dlsniper 2017-10-10 22:19:01 would my arg just magically work?
exbigboss 2017-10-10 22:19:11 Point being, buddha’s attitude is the one I’ve encountered the most Sort of like, if you don’t like America, get out
dlsniper 2017-10-10 22:19:32 point being, if you can't explain it, don't pretend you understand it
200sc 2017-10-10 22:19:46 People don't use C++ or Java because they are painful to work with
exbigboss 2017-10-10 22:19:47 I’m not sorry I’m not gonna fix some contrived code sample
buddhamagnet 2017-10-10 22:19:48 At work I use Go, some Lua (in nginx), JS (I work on GraphQL and lambda) I just sensed you may be happier I didn’t say get out
exbigboss 2017-10-10 22:20:26 Go would probably get a lot more C++ people to switch over if it did have generics though
dlsniper 2017-10-10 22:20:30 @exbigboss you said that generics would help, and I asked how, I explained the constraints and you now say oh I can't be bothered
exbigboss 2017-10-10 22:20:35 It has great libs and features Just the lack of generics is almost crippling
dlsniper 2017-10-10 22:20:54 and no, it's not a contrived example, I just wrote it and wanted to remove duplicating the same code 3 times
exbigboss 2017-10-10 22:21:04 If you want my honest answer about how to fix that code, I’d rm it and start over, I guess

Related Questions