>> On 7 Aug 2020, at 23:28, Marco Sulla <marco.sulla.pyt...@gmail.com> wrote: > Let me first say that I don't know if my post is on topic with the > mailing list. If so, please inform me. > > My idea seems to be very simple (so probably it's not simple at all): > a language similar to Python, but statically compiled. > > (Yes, I know Cython, RPython, Julia, Rust...)
Have a look at Apple’s Swift. It reminds me of python as I read it. I have not done more the read the language reference docs. Sadly it seems that it has not been ported to none Apple platforms. Barry > > Since I've not great skill in low-level programming, I'm trying first > to define what I really want. > > My core ideas are: > > 1. Statically compiled (of course...). So if you write: > > var a = 1 > > the variable `a` is an integer and it's value can't be changed to > anything that is not an integer > > 2. Use of smart pointers. Instead of having a refcount in every > object, the language implementation will use a smart pointer as a sort > of "proxy" to the "real" pointer. This could allow the language > implementation to delete the object only when really necessary (lack > of memory) and/or do JIT optimizations (move the object to a slower or > a faster memory; compute and cache some object attributes, as hash; > remove object duplicates...) > > 3. functional programming under-the-hood. Users can write also in > imperative style, but in the language implementation only the > functional style is really used. This way *maybe* it's more simple to > write concurrent programs without a GIL. > > But I have a lot of doubts. The one that bothers me most is: compile > to binary or to C? > > My idea at the beginning was to compile to C code without creating an > AST. Virtually any system has its own C compiler. Maybe it *seems* > more simple, but it's quite more difficult? > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list