Design Questions

This section is really more useful for me than for Magpie users, but it may offer some insight into why the language is designed the way it is. When I first started working on Magpie, I'd run into basic design questions that needed answering. Each time, I would sit down and work my way through it until I reached a solution that seemed to make sense. I'd code up the result and move on.

Later, I'd forget all of the reasoning and then second guess the result. "Why did I do it this way when this other way makes so much more sense?" After going in circles a few times, I realized I should really write down not just the answer, but the reasoning that led to it.

Each page in this section is a specific language design question, the answer (if I have one), and the reasoning that led to it. They're somewhere between a Socratic dialogue and a personal journal. They may be kind of hard for anyone but me to understand, but maybe you'll get something from them.

Please keep in mind that I write these as I go, which means a lot of this content may be outdated as later design decisions affected or overrode it.

  1. Are All Types First Class?
  2. How Do Callable Fields Work?
  3. What Is the Type of a Generic?
  4. Are Types in Java or Magpie?
  5. Can All Generic Arguments Be Inferred?
  6. How Are Classes Declared?
  7. How Are Generic Functions Checked?
  8. How Are Methods Defined?
  9. How Do Abstract Members Work?
  10. How Do Fields Work?
  11. How Do Operators Work?
  12. How Does Inheritance Work?
  13. Interfaces or Abstract Classes?
  14. What Conversions Are Needed?
  15. Where Do Type Expressions Appear?
  16. How Are Syntax Extensions Imported?
  17. How Do Multimethods Work?
  18. How Are Bare Names Interpreted?
  19. How Do Callables Work With Multimethods?
  20. What is a Multimethod's Identity?
  21. How Do Multimethods Interact with Modules?