The "loop and a half"

Chris Angelico rosuav at gmail.com
Mon Oct 9 09:08:58 EDT 2017


On Mon, Oct 9, 2017 at 11:43 PM, bartc <bc at freeuk.com> wrote:
> On 09/10/2017 05:49, Chris Angelico wrote:
>
>> Generally, my preferred editor is nano, since it lives within those
>> requirements but still has a decent UI. It's not always available
>> though, and it's useful to know how to manage without it. But even
>> though you won't always be doing this sort of thing, it's definitely
>> something that a *programming language designer* should be aware of.
>> Basic networking is critical to any modern language.
>
>
> That's an odd opinion given that modern languages don't even want to have
> basic input and output as part of the language; they're offloaded to a
> library. And in your example, which I don't really understand, it seems more
> like the headache of the application.
>
> (Where a language allows elements of a program to be disseminated across a
> network, that's rather different, and an advanced feature that only some
> languages might have. Not all.)

The standard libraries of most application languages include both
console I/O and networking. ("Application language" excludes such
things as JavaScript in a web browser, which for security reasons is
not permitted file system access, and has limited console and network
features. But Node.js has all of the above.) The distinction between
language syntax and the standard library is not overly significant
here; things that don't need to be syntax are best implemented with
the standard library. We're not talking about third-party libraries
here - with a vanilla CPython 3.6 and no external libraries, you can
access the console and you can open a socket. (And you get
higher-level facilities too - protocols like HTTP, FTP, DNS, and SMTP
are handled too.)

ChrisA



More information about the Python-list mailing list