Deutsch   English   Français   Italiano  
<vqb18d$2mem7$2@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.c
Subject: Re: Python recompile
Date: Thu, 6 Mar 2025 02:28:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <vqb18d$2mem7$2@dont-email.me>
References: <vq1qas$j22$1@gallifrey.nk.ca> <vq1uvb$qbuq$1@dont-email.me>
	<vq22nc$rvb8$1@dont-email.me> <vq24kd$rg6i$1@dont-email.me>
	<vq3oag$18iv6$1@dont-email.me> <vq4hf2$1brf7$1@dont-email.me>
	<vq4l3d$1ck9e$1@dont-email.me> <vq4m0u$1ctpn$1@dont-email.me>
	<vq4n05$1d5dv$1@dont-email.me> <vq4om7$1dbo2$2@dont-email.me>
	<vq6dqh$1pskk$1@dont-email.me> <vq6f8p$1pmnk$1@dont-email.me>
	<vq6gqc$1qcp8$1@dont-email.me> <vq6ips$1pmnk$2@dont-email.me>
	<vq6j5h$1qosf$1@dont-email.me> <20250304092827.708@kylheku.com>
	<vq7g1p$1vmg5$1@dont-email.me> <vq8544$23f55$4@dont-email.me>
	<vq88s7$242vk$1@dont-email.me> <vq8cdq$24hi9$2@dont-email.me>
	<vq9di0$2db82$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 06 Mar 2025 03:28:30 +0100 (CET)
Injection-Info: dont-email.me; posting-host="5fed1e3e41d7a92fa0a0e33e61fef7d8";
	logging-data="2833095"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+86sZ8o9J4LLE4T7nAzntu"
User-Agent: Pan/0.162 (Pokrosvk)
Cancel-Lock: sha1:lIoZcp/0XIxsiyLzsLilRkcy4KY=
Bytes: 3258

On Wed, 5 Mar 2025 11:46:08 +0000, bart wrote:

> * Compile-time enumerations, and parallel tables of enums and data

Python doesn’t have enumerations as a language primitive; instead, they 
are implemented in a library module, written in pure Python -- it doesn’t 
do anything you can’t do in your own code. But it supports arbitrary 
attributes attached to enum instances, and subclassing of enums.

> * Jump-table-based 'switch' (this requires those named consts or enums)

Does it do switched expressions? You can do those in Python.

> * Built-in Support for C-style data types, including C-style structs and
> homogeneous array types
> * Built-in FFI for C-style APIs

Python provides this in the standard-library ctypes module. Remarkably 
useful for making a wrapper around a C library to make it look like the 
library was designed for use from Python. I have done a lot of wrappers 
like this.

> * Character constants: 'A' and 'ABCDEFGH' (Python needs 'ord("A")')

Python also has “\u” and “\U” for Unicode.

> * Static local variables within functions

Not really necessary, with classes.

Do you have lexical binding?

> * Built-in maths functions and constants like 'pi'

Complex arithmetic? <https://docs.python.org/3/library/cmath.html>

Hyperbolic functions? Gamma/log-gamma?
<https://docs.python.org/3/library/math.html>

There’s a reason why we don’t want to build all these into the core 
language, since there are so many of them that are needed nowadays.

> * Expression-based macros

Really only necessary if your language is not dynamic enough.

I notice no mention of coroutines or iterators. Those are quite useful 
nowadays.