hermetic

Languages and libraries

programming language

SHOW HN2015

hermetic

A Python with Hindley-Milner-like type annotations, compiling to C

github.com

#python compiler#typed python#compile python to c#hindley-milner

134points
27comments
#161of 2,565 in 2015
Top 7%of 2015 by points

How HN took it

LovedMost comments that take a side are positive

5 positive, 4 neutral or asking, 1 mixed, 1 critical, out of 11 comments about the project. Thread score +0.33.

Idea: 2 for, 0 againstExecution: 0 for, 1 againstDesign: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Typed, fast Python is a wanted idea

    From 1 comment
    • A typed and fast Python with concurrency is something I've wanted for the longest time. I really hope that this will take off.
      strictfp on HN
  • Impressive work and generated C is amusing

    From 2 comments
  • Compile-time type enforcement is the key value

    From 1 comment
    • The value-add here is that it compiles to C and therefore the type enforcement is done at compile time. If you are OK with interpreted Python and runtime checking you can use…
      bkeroack on HN

Objections

  • Prototype does not yet support many basic constructs

    From 1 comment
    • Very cool idea, I like it. But I can't really get much to compile yet -- while loops do not work, nor does range(). Anyway, quite impressive!
      lorenzhs on HN
  • Classes and records are not implemented yet

    From 1 comment
    • Well yeah, but I wanted to experiment with the language type system(it started from HM, but it can go anywhere). Classes/records are not implemented yet, but I can imagine that…
      alehander42 on HN
  • Hindley-Milner does not handle class-based inheritance

    From 1 comment
    • Correct me if I'm wrong but IIRC HM is not applicable with class-based inheritance. How do you (plan to) deal with this? BTW I really like the idea of a typed, compilable Python,…
      evacchi on HN

Requests

  • Support for while loops and range()

    From 1 comment
    • Very cool idea, I like it. But I can't really get much to compile yet -- while loops do not work, nor does range(). Anyway, quite impressive!
      lorenzhs on HN
  • Add a benchmark of performance

    From 1 comment
    • Nice. I wanted to find out how well it performs (with a simple summing task) but I gave up before I had managed to loop over a range. I'll check back in a week or two ;)
      lorenzhs on HN

Questions

  • How will class-based inheritance be handled under HM typing

    From 1 comment
    • Correct me if I'm wrong but IIRC HM is not applicable with class-based inheritance. How do you (plan to) deal with this? BTW I really like the idea of a typed, compilable Python,…
      evacchi on HN
  • Has cython been tried as an alternative

    From 1 comment
    • Have you looked at cython? It's (optionally) typed, fast (with only a little bit of effort extra effort over writing normal python), makes the GIL optional (for a reasonable…
      dagw on HN

Alternatives named

  • Cython

    From 2 comments
    • Have you looked at cython? It's (optionally) typed, fast (with only a little bit of effort extra effort over writing normal python), makes the GIL optional (for a reasonable…
      dagw on HN
    • +1 for cython. The only criticism I could make is that the real speedups come when you can avoid using PyObjects which means the easiest way to employ it is in the inner loops of…
      kevin_thibedeau on HN
  • Nim

    From 1 comment
    • Have you tried Nim? The syntax is Python-inspired rather than Python-like, but it seems to combine a lot of the nice features of dynamic languages with the rigour of a static…
      david-given on HN
  • MyPy

    From 1 comment
    • MyPy is a pretty good typed Python variant. I believe the "optional type annotations" PEP used their style. http://mypy-lang.org/
      keypusher on HN
  • RPython

    From 1 comment
    • There have been other typed Python variants. RPython, in which PyPy was written, is sort of one. Shed Skin tried to do it entirely via type inference, which is really hard across…
      Animats on HN
  • Runa

    From 1 comment
    • Those who like this might also like my language project, Runa: A Python-like systems programming language. This means that the design borrows as much from Python as makes sense…
      dochtman on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/9779097)