sasagawa888 / eisl

ISLisp interpreter/compiler
Other
267 stars 22 forks source link

type inference in Lisp - typed racket #303

Closed reuleaux closed 1 month ago

reuleaux commented 7 months ago

sorry, I don’t have much time - and I yet have to try out eisl - but I regularly follow your blog posts (on medium): concerning your lastest one there - about type inference in Lisp: you may want to have a look at typed racket perhaps (it works with optional type annotations + type inference as I understand - again: not much experience with that personally). You can find some videos on typed racket at https://racket-stories.com/ (where I found your blog posts by the way), for example: Introduction to Typed Racket - Mark Farrell - I should sign up w/ medium some time (sorry for misusing this gh issue tracker thus for just leaving a comment) - Hope this helps. - A’

sasagawa888 commented 7 months ago

Thank you,

reuleaux commented 7 months ago

Ah, and I forgot: there is another video on Typed Racket - also on Racket Stories: Keynote: From Scheme to Typed Racket - Sam Tobin-Hochstadt (www.youtube.com)

reuleaux commented 7 months ago

And allow me one more remark: David Christiansen has worked on dependently typed Racket at the time - if I remember right - or at least on some subset of Racket - his book: “The Little Typer” certainly uses some Lisp notation. - worth considering perhaps: start with a powerful / modern type system right away. - That being said: in dependently typed languages you typically need type signatures (need to be clear about your types upfront) - and have less (no?) type inference.

reuleaux commented 6 months ago

one more remark - not sure, how useful this is, but anyway: having some fun with Janet https://janet-lang.org/ recently - an expressive and modern (non-traditional ) Lisp - according to its main author (https://bakpakin.com/) - and seeing that there is some type checking happening there (grep for _janetchecktype in the src) - maybe you can borrow some ideas from there? - I am aware that this is not classical Hindley-Milner type inference (and therefore maybe not what you were looking for) - and that Janet is not ISLisp - but then: I find Janet quite impressive / useful - have a look at the Janet for Mortals blogposts for example, https://janet.guide/scripting/ (for a DSL for scripting, and the other ones) - hope this is not too much off topic - just my 2c.

reuleaux commented 4 months ago

One more remark: there is a chapter or two on types and type checking in Shriram Krishnamurthi's book (in Racket), free for download from https://www.plai.org/