Hacker News new | past | comments | ask | show | jobs | submit login

Rust has this problem with its module system. It has top-level "items" that can be functions, types, global variables, …or modules. The way modules are defined and imported is consistent with defining and importing of named structs and functions.

But every new user is totally confused about this (I'm not even sure if my explanation above will be understood), because everyone expects modules to be a special case of imperative file loading operations, rather than declarative syntax creating named namespaced items, like everything else in the language.




D's original symbol table system was completely consistent, extensible, and orthogonal. I explained it till I was blue in the face, and exactly zero people understood it. D now has a significantly more complex one.


Rust has a mod declaration tree and a use import graph.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: