notes.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Which things are complete?
  2. ==========================
  3. Done
  4. ----
  5. Bugged
  6. -----
  7. WIP
  8. ---
  9. Not Started
  10. -----------
  11. Specific Architectual Decisions
  12. ===============================
  13. Objects
  14. -------
  15. Object-oriented programming isn't really helpful, and may be considered
  16. harmful, as many times objects of different classes interact and are
  17. contained within each other in a messed up state.
  18. Classes are still used---but they're all dataclasses. Think of them as
  19. structures in C, or simple datatypes in Haskell.
  20. <Lua> I have tables. That's all I need!
  21. Exceptions and Errors
  22. ---------------------
  23. User-created errors are defined in exceptions.py, and MUST subclass
  24. exceptions.IDCUserCausedException. Each of them MUST define an
  25. errorType attribute, which is similar (but more English and informative)
  26. than IRC reply codes.
  27. The main loop MUST catch all IDCUserCausedException exceptions and throw
  28. them to the client, taking the exception's severity attribute as its
  29. "command" (the name of the enumeration?) and using the errorType as the
  30. TYPE keyword argument. If the exception objects contains arguments, the
  31. main loop MUST also hand these over to the erroneous client, as the
  32. COMMENT keyword argument.
  33. This way of exception handling SHOULD NOT be suspicous. luk3yx is the
  34. only sus person in the whole world.