A Sane Directory Structure for Software Projects

7 months ago by codeinabox to c/programming

tourist 20 points 7 months ago
main.py          402MB
run.sh           1KB
path: 0 22696790, hotness: undefined, score: 20, children: 0
TehPers 9 points 7 months ago

The high-level directory structure looks reasonable, but every language and build tool has its own recommended structure that people should use instead. For example, by default, cargo looks for a src/main.rs or src/lib.rs as an entrypoint. uv expects one of a couple different project structures before you need to touch the pyproject.toml. C# will create namespaces for each of these nested subdirectories if you don't carefully configure it in your .csproj file. And so on.

It's best to just use whatever's recommended for your environment by your tools. Maybe this directory structure works well for Guile Scheme, but I wouldn't touch it at all if I were writing Rust.

path: 0 22698481, hotness: undefined, score: 9, children: 0
Paragone 2 points 7 months ago

< sigh >

There WAS a video on yt by a Norwegian man on why OO languages push people into spreading side-effects throughout the code, whereas in Haskell, side-effects are optimally conserved to Main.hs

I can't find that video, now.

He was on stage, a talk of some kind, not as formal as a university-lecture, so it was some conference, of some kind.. ( in case anybody else finds it )

I think that that principle is contradicting what the article is saying.. ( skimmed the rest, I think he's generally right, but burying side-effects seems to be wrong, from Haskell's perspective, & I think Haskell's right, generally. )

_ /\ _

path: 0 22702514, hotness: undefined, score: 2, children: 0
programming
programming

@programming.dev

login for more options
28830
3723
3326

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...