top | item 31356741

(no title)

rackjack | 3 years ago

I think the most surprising thing about Rust modules is that you need to """pre-declare""" them, especially since Rust doesn't really use function prototypes.

So when you try to move a module into its own file, you need to keep the `mod foo` in the original file.

discuss

order

pjmlp|3 years ago

Ada,

    with foo; -- Import
    use foo;  -- open namespace
Seems familiar.