Live data from Hacker News

Show HN: Mys – an attempt to create a statically typed Python-like language

github.com

51–57 of 57 posts

Re: Show HN: Mys – an attempt to create a statically typed Python-like language

#53

Earlier quoted context omitted.

Alternate idea: a language called Typon in which the compiler paves over typos of keywords and symbol names.

Like a whole language built on the fuckit principle.

I thought that was Perl... ;P

Re: Show HN: Mys – an attempt to create a statically typed Python-like language

#54

Earlier quoted context omitted.

Not OP, but a big Nim fan. I think Nim has made a mistake by marketing itself as Python inspired. I know why it does so; Python is a very successful language and as a niche language, Nim wants to associate itself with an established one. But in my experience, Nim has a very small overlap with Python. It is whitespace significant, prefers short words to symbols for operators, and has a robust stdlib. But if you look a…

It took me a couple of weeks to realize Nim’s semantics are really different. Despite that Nim feels like an alternate reality of Python 2 -> 3 that went more lispy and a bit Pascal-ish. It gives me the old Python 2.7 vibe. Though I’d still prefer ‘def’ to ‘proc’ but that’s pretty minor to me. It’s interesting to see how well the typed Python syntax maps to a static implementation of Python. The speed should probably…

The really nice thing about proc is that emphasizes that they are in fact procedures, rather than mathematical functions - a distinction that becomes more relevant as FP gains mindshare.

Re: Show HN: Mys – an attempt to create a statically typed Python-like language

#56

Strongly typed? You mean statically typed? See "What to know before debating type systems" : http://blogs.perl.org/users/ovid/2010/08/what-to-know-before...

> Type inference is generally a big win. I see this claimed a lot, but haven’t seen any evidence.

Not sure if this qualifies as evidence, but a quick search shows there are papers exploring the topic of whether type inference is a "big win" or not.

Benefits of Type Inference for an Object-Oriented Real-Time Language

https://www.researchgate.net/publication/220391749_Benefits_...

EDIT: Granted, this particular paper may be more claims without solid evidence.

Re: Show HN: Mys – an attempt to create a statically typed Python-like language

#57
post #5

Given that the OP is the github project owner, are you aware of https://chocopy.org/ ? You might want to also look at Shedskin, https://github.com/shedskin/shedskin which converts implicitly typed Python programs to C++

For the sake of completeness, might as well mention Nuitka [1] (another Python -> C compiler), Cython (Python-like language that compiles to C), and Numba (LLVM-based JIT compiler for a limited subset of Python). [1]: http://nuitka.net/ [2]: https://cython.org/ [3]: https://numba.pydata.org/

In the special purpose for computation (like Numba) department, but more general: TorchScript from PyTorch https://pytorch.org/docs/stable/jit_language_reference.html#...

It doesn't compile to C but to an IR, but some ideas around typing might be similar.

Post reply on HN