[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Portability of Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 30 Apr 2013 10:01:24 -0300
> It can't be more portable than the language it's implemented in.
Of course, that depends on your meaning of portability. C has way too
many non-portable features, so programs written in C usually are
non-portable. You can write very portable programs in C, but you must be
*very* careful. If we follow the standard, a lot of things we take
for granted in C are undefined and should not be used in portable programs
(e.g., any use of pointer subtraction and ptrdiff_t).
So, a language implemented in C, but making judicious use of its features,
can be more portable than C, in the meaning that the "chance" of an
"arbitrary" program in that language work in different platforms is
higher than the chance for an arbitrary program in C.