News for hackers. Stuff that matters.
Re:Being sued, in East Texas, for using the Google Play Stor... by dopamean on Wednesday June 08, 2016 @05:17PM (#11865736)
I know nothing about C. You can alias keywords like that?
Re:Being sued, in East Texas, for using the Google Play Stor... by odbol_ on Wednesday June 08, 2016 @05:28PM (#11865814)
#define is part of the preprocessor, which does very basic string substitution on the code before compiling. Useful in small doses, but also regularly abused.
Re:Being sued, in East Texas, for using the Google Play Stor... by david-given on Wednesday June 08, 2016 @07:01PM (#11866372)
Re:Being sued, in East Texas, for using the Google Play Stor... by Raticide on Wednesday June 08, 2016 @08:14PM (#11866738)
You can even do evil like

    #define true false
Re:Being sued, in East Texas, for using the Google Play Stor... by MereInterest on Wednesday June 08, 2016 @10:39PM (#11867226)
Along the same lines, for added (and undefined) fun:

    #define static thread_local
    #define if(X) if((X) ^ (rand() < 1000))
    #define private public
    #define while if
Re:Being sued, in East Texas, for using the Google Play Stor... by ball_of_lint on Wednesday June 08, 2016 @06:09PM (#11866097)
In C, #define basically does string substitution, so absolutely.

You can also do even more weird things with it, like X macros

Re:Being sued, in East Texas, for using the Google Play Stor... by goldenkey on Wednesday June 08, 2016 @05:41PM (#11865905)
Boost has macro header libs that allow pretty much anything within the macros system limits to be computed. Lookup Boost preproccessor and youll be even more impressed.
Re:Being sued, in East Texas, for using the Google Play Stor... by eric_the_read on Wednesday June 08, 2016 @06:23PM (#11866157)
My dad used to tell idiots that he was very impressed with their ideas; one day, he pointed out to me that the impression was not always a positive one.

Edit: Not saying Boost is idiotic; just that you may not be positively impressed with their use of preprocessor magic.

Re:Being sued, in East Texas, for using the Google Play Stor... by goldenkey on Wednesday June 08, 2016 @07:54PM (#11866643)
Pretty funny. I have to use that "impressed" fib one day and silently chuckle. Ive actually used Boost preprocessor macros in C for huge benefits to compute variadic functions at compile time. You may not like boost templates or libs but the preproccessor stuff is merely just a turing complete arithmetic language that includes arrays, tuples, lists, and a whole slew of other great things. Its actually quite marvelous how its implemented all from standard macros. A treatise in limited functional programming. I would not want to produce those macros myself..they are insanely clever, just take a look at the source. They use something similar to Church encoding for representing numbers. You can use it without any of the other boost libs or headers. Repetitive code sucks and the BOOST_PP macros are godsend. Im pretty sure you are referring to other 'magic' most likely C++ template stuff. All boost PP does is give you data structures, loop, and arithmetic at compile time. [1]

[1] http://www.boost.org/doc/libs/1_61_0/libs/preprocessor/doc/i...

Re:Being sued, in East Texas, for using the Google Play Stor... by kagamine on Thursday June 09, 2016 @02:21AM (#11867859)
The same goes for "quality". It may be a quality product but a poor quality product. If 'quality' is the best word marketing can come up with, maybe marketing isn't of very high quality!