grain-lang.org icon indicating copy to clipboard operation
grain-lang.org copied to clipboard

Document type system specifics

Open ospencer opened this issue 5 years ago • 1 comments

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

ospencer avatar Aug 06 '20 01:08 ospencer

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:

chriskrycho avatar Aug 06 '20 02:08 chriskrycho