Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Learning Rust – Day 4 – Understanding Modules. Parent comment
rust:
top-level for a crate: lib.rs
module: $modulename.rs or $modulename/mod.rs or a `mod $modulename` block in lib.rs
sub_module: $parent/$sub_module.rs or $parent/$sub_module/mod.rs or a `mod $sub_module` block in $parent/mod.rs
python:
top-level: have the right directory or file in python path
module: $module_name.py or $module_name/__init__.py
sub_module: $parent/$submodule.py or $parent/$submodule/__init__.py
ruby:
top level: have the right file or directory in import path
module: $libname.rb with `module $libname` block
submodule $libname/$submodule.rb with `module $submodule` block
go:
top-level: somewhere in gopath have dir $module that declares `package $module` (convention, you could have a different package name)
module: all files in $module_name that declare `package $module_name`
module: $moddir/$submodule where module files declare `package $submodule`
It's not wildy different. Whats this FUD about?
There are no comments on this comment yet.
rust:
top-level for a crate: lib.rs
module: $modulename.rs or $modulename/mod.rs or a `mod $modulename` block in lib.rs
sub_module: $parent/$sub_module.rs or $parent/$sub_module/mod.rs or a `mod $sub_module` block in $parent/mod.rs
python:
top-level: have the right directory or file in python path
module: $module_name.py or $module_name/__init__.py
sub_module: $parent/$submodule.py or $parent/$submodule/__init__.py
ruby:
top level: have the right file or directory in import path
module: $libname.rb with `module $libname` block
submodule $libname/$submodule.rb with `module $submodule` block
go:
top-level: somewhere in gopath have dir $module that declares `package $module` (convention, you could have a different package name)
module: all files in $module_name that declare `package $module_name`
module: $moddir/$submodule where module files declare `package $submodule`
It's not wildy different. Whats this FUD about?