[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Handling deprecated features..?
- From: Uli Kusterer <witness.of.teachtext@...>
- Date: Fri, 5 Aug 2005 21:37:25 +0200
On Aug 5, 2005, at 3:14:14, Mike Pall wrote:
Python has a fairly elaborate scheme with forwards and backwards
compatibility, deprecation warnings and 'from __future__ import'
and whatnot. Well, you may ask ... what's wrong with it?
Well, there's a chicken-and-egg problem with this one. The parser
bails out before you can run the chunk to tell the parser that
it shouldn't (and a global flag doesn't cut it).
Doesn't Lua effectively do weak-linking? I.e. couldn't one just
compare the function name against NIL? An undeclared global in Lua is
NIL, after all. So, if you're running a pre-compatibility-check
version of Lua, you have compatmode5_0 being NIL. Otherwise, you can
call it to actually query the particular feature, can't you?
-- M. Uli Kusterer