lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jul 28, 2017 at 7:51 AM, Russell Haley <russ.haley@gmail.com> wrote:
> Why not call it what it is: LUA_USE_DLOPEN_READLINE? IMHO that's a far
> more descriptive label and becomes a descriptive structure that can be
> used by any operating system that needs those libraries.

Thinking in the shower (one of my best thinking spots!):

If one applies the maxim that code should be no more complicated than
necessry and the historical understanding provided by LHF (makefile
hasn't changed in 7 years) is taken into consideration, it would be
logical to say the following:

- The OS specific defines add obscurity not clarity as it obfuscates
what the define is for in the first place. Especially as the targets
provide the reference to the platform in the first place
- The define only encompasses three other items and is therefore
largely necessary in the first place (probably wrong on this but...)
- There is little change to these items and they are NOT operating
system specific.

Therefore (in my mind) If all NON Windows systems use LUA_USE_POSIX
(sorry, not in front of the makefile so this could be wrong),  using
existing, descriptive defines with three operating systems instead of
creating three identical defines with different names is the MOST
clear step that could be taken. There would have been no need to look
into any of these details if all non-windows systems were set to
LUA_USE_POSIX and then the ones that require dlopen and readline would
explicitly include those items for clarity.

Russ



> On Fri, Jul 28, 2017 at 7:35 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> 2017-07-28 16:26 GMT+02:00 Russell Haley <russ.haley@gmail.com>:
>>> On Fri, Jul 28, 2017 at 5:43 AM, Luiz Henrique de Figueiredo
>>> <lhf@tecgraf.puc-rio.br> wrote:
>>>>> Both LUA_USE_LINUX and LUA_USE_MACOSX use the same defines but get
>>>>> named separately.
>>>>
>>>> Just for psychological reasons: it's strange that "make macosx" shows
>>>> compilations lines with -DLUA_USE_LINUX.
>>>>
>>>>> Is there a reason there is no LUA_USE_FREEBSD?
>>>>
>>>> No special reason, except that we think Linux and MacOSX are the more
>>>> common platforms. No offense meant.
>>>
>>> I run in to this all the time, and I'm not REALLY offended but I try
>>> to draw attention to the inconsistency, especially since you went to
>>> the trouble to make a target for FreeBSD. It's seems inconsistent to
>>> say that showing the word Linux while building on MACOSX is strange
>>> but it's okay for FreeBSD.
>>
>> A mathematician's solution would be to generalize, Linux, Max OSX and
>> FreeBSD all being special cases of OSIX (something not quite POSIX,
>> get it?) Then LUA_USE_OSIX offends no one and is understood by
>> no one. Fair enough?
>>