grain-lang / grain-lang.org

The Grain language website.
57 stars 42 forks source link

Document type system specifics #95

Open ospencer opened 4 years ago

ospencer commented 4 years ago

This would be a page on what kind of type system we have, features, etc. It should live in the language constructs section (though we should consider renaming that section).

Related: #82

chriskrycho commented 4 years ago

So it doesn't get difficult-to-find in the Discord archives, I'll add here the conversation we had that prompted this:

Me:

  1. You mention on the website a desire to use ideas from academia. The guide didn’t cover anything that I haven’t seen in increasingly mainstream production languages including Rust, Swift, etc., so I’m curious what other ideas are in the works!
  2. What’s the typing system? Nominal, structural, or a mix? There was a hint this direction in the discussion if the equality and is pervasives, but that was all I could see.

@ospencer:

  1. I'd say the main two things (both still in development) are our number system and our macros. Our number system will be heavily inspired by Racket's number system once fully implemented, and our current plan for macros involves some fun dynamic parser generating so library authors will have a decent amount of control over their macro syntax.
  2. It's largely nominal, though I could see a mix if we ever add objects to Grain, but that's not something we've discussed :slight_smile: