Skip to content

Module naming scheme pollutes top-level namespace #152

@markrtuttle

Description

@markrtuttle

I'd like to require that

  • Modules in the Dafny library insert themselves into the Dafny namespace. Examples would be Dafny.JSON, Dafny.FileIO, and Dafny.Math.
  • Langauge-specific code in the Dafny library insert themselves into the DafnyLibraries namespace. An example currently is DafnyLibraries.FileIO.

The current library pollutes the top-level namespace in ways that potentially clashes with the namespace of a target language. For example, now we have the Dafny Math module defining abs, min, and max that conflicts with the Java Math module and JavaScript Math module. The library modules should insert themselves into their own namespace to avoid conflicts.

The current FileIO library establishes the practice of inserting language-specific implementations into DafnyLibraries. Using DafnyLibraries for code and Dafny for modules works well. Dafny seems to dislike a module under Dafny externing out to external code that is also under Dafny (yielding "not found" error messages).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions