Assignment versus binding

BartC bc at freeuk.com
Thu Oct 6 07:32:54 EDT 2016


On 06/10/2016 00:27, Chris Angelico wrote:
> On Thu, Oct 6, 2016 at 9:45 AM, BartC <bc at freeuk.com> wrote:

>> Small languages are perfectly viable: the JIT version of Lua, for example,
>> is only about 225KB, and is very fast.
>>
>> If I wanted to send you program.lua, and you didn't have Lua, I only need to
>> add luajit.exe and lus51.dll (for Windows). With my system, it would be
>> program.q and r.exe, even for multi-module apps.
>
> See above about how restricted the stdib is. Lua, on its own, is not a
> full-featured language for writing general-purpose applications. It's
> designed to be embedded in something else, and it's great at that, but
> it doesn't have all the features of a modern apps language.

Some languages don't come with their own libraries but are expected to 
hook into third party ones. OpenGL for example, which on Windows existed 
as a language-neutral set of DLL files (iirc). A language might provide 
'bindings' as a convenience, or perhaps an easy-to-use set of wrappers.

It's just a lower-level way of doing things compared to what you might 
be used to.

  You could
> write an Ook interpreter in a handful of bytes of code, but it's not
> what you would write an app in. Since you're talking about Windows, I
> grabbed file sizes for Windows installers; for Pike, the .msi file is
> a 24MB download, and Python clocks in variously at 18MB (32-bit
> 2.7.12) up to 28MB (64-bit 3.5.2 full installation). Those kinds of
> figures are pretty reasonable for full-featured language interpreters.
> You get enough for it to actually be usable as-is, but you're not
> getting a full C dev environment.

And those are compressed download sizes.

I started creating interpreters when they had to run within a tiny 
corner of 640KB main memory, and they were a tremendously useful way of 
helping implement applications by using scripts. (Scripts also acted as 
overlays resident on floppies and loaded as needed.)

It also meant users could instantly create and run their own scripts 
(without using huge, sprawling and, in 1980s, incredibly slow compilers).

You can't just dismiss something as useless just because it's relatively 
small. (I've been using my interpreters to run compilers. What 
specialist libraries does a compiler need other than file i/o? None!)

-- 
Bartc



More information about the Python-list mailing list