09-16-2015, 01:40 AM
Welcome back!
Yes, move it out
Yes, move it out
Random Chitchat 2012-2016
|
09-16-2015, 01:40 AM
Welcome back!
Yes, move it out
09-17-2015, 11:22 PM
09-18-2015, 11:28 PM
I just learn't about higher order macros in c++. Would anyone object if I made the broadcast functions use them to avoid writing 20 identical functions?
09-19-2015, 01:21 AM
Could you elaborate a bit more on that? I'm not familiar with "higher order macros".
09-19-2015, 02:33 AM
Its where you pass a macro as a macro parameter. Like higher-order functions but with macros.
For example: Code: #define Foo(a) a##b
09-19-2015, 07:56 AM
Will it be maintainable? Wouldn't cBroadcastManager be a better solution, since it could be callable from Lua as well?
09-19-2015, 08:54 AM
Maintainability is my main worry, but it gets rid of a lot typing. At the moment even with cBroadcastManager involves writing an identical function for each broadcast packet. With higher order macros, you can get writing those glue functions down to just a list of parameters and names.
Maybe a generator would be more maintainable, its just lua is not good at text.
09-21-2015, 06:37 AM
Try to write one or two, and then let us see what it would be like. If it feels like magic, it'd be better to spell everything out explicitly, even if it means a few (thousand) extra keystrokes
09-21-2015, 07:35 AM
Anyone remebers gource?
I hope its not too fast now.
Its a bit too fast. Also, it needs a better way of determining attribution, as most of the main contributors appear as multiple people, often at the same time.
And Can anyone understand why cClientHandle::SendChat has such a complicated way of fetching cWorld: https://github.com/cuberite/cuberite/blo....cpp#L2092 ? |
« Next Oldest | Next Newest »
|