Hacker News new | ask | show | jobs
by sakagami0 2282 days ago
Wow I made the same thing that I put v1 up a couple days ago.

https://github.com/tetranoir/presi

A main difference is I tried to get rid of having a separate line to create the Type and I tried to get rid of having to learn a new libary's api as much as possible.

1 comments

This looks interesting too, but the syntax fells really weird to me.
A goal was you can treat it Exactly like an "Interface". I agree it looks totally nonsensical but I think of it as a text replacement.
The assignment to class properties reminds me an awful lot of stuff I've seen in Python, particularly in Django/REST Framework.

But the class wrapping thing would just break my brain every time I tried to use it. Calling plain functions just feels a lot more natural to me.