flix / book

The Flix Programming Book
Other
16 stars 22 forks source link

fix: remove refs to namespace keyword (#140) #141

Closed stetimi closed 6 months ago

stetimi commented 6 months ago

namespace doesn't look to be a keyword any more: I tried let namespace = 0; and it wasn't highlighted in VS code. So took it out of highlights.js too. There's a couple of textual references to namespace. Perhaps the they could be replaced by "module" now?

magnus-madsen commented 6 months ago
* companion-modules.md: "When accessing a member of `Addable`, Flix will automatically look in both the
  trait declaration and its companion namespace."

Yes, this should be companion module.

* modules.md: "We declare modules using the `mod` keyword followed by the namespace and name of
  the module."

This is OK. We use the technical term namespace for the name of the module.

* traits.md: "This is the purpose of a `sealed` trait, for which instances outside the trait's namespace are not permitted."

This should be module.

magnus-madsen commented 6 months ago

If you make the above changes then we can merge :)

Note the highlight.js file is auto-generated from here: https://github.com/flix/highlightjs-flix so there is no need to edit it manually. Instead, it should be updated and regenerated. But you don't have to do that in this PR.

stetimi commented 6 months ago

Done.

magnus-madsen commented 6 months ago

Excellent. Thanks!