Separation of concerns — Locality is more important. Code that changes together should live together.
@ku🤔profilefollowHai I am kureplied to@stagas🤸profilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:Interesting. I wonder what you think about unit tests... Because apparently in rust, the code and the tests live in the same file? In asp dot net, they are completely different projects 😕
@stagas🤸profilefollow
creative technologist
creator of textlogreplied to@ku🤔profilefollowHai I am ku:
creative technologist
creator of textlogreplied to@ku🤔profilefollowHai I am ku:I tried to do the same as Rust in TypeScript, I made a test runner that ran the
test_X function for the file. It worked ok, but it became too messy so I decided separate files with the same filename + .spec is good as well. I definitely not want to hunt the test files in different directories/projects.@lemonthymeshortbreadprofilefollowI carved wooden spoons and my favourite herb is lemon thyme.replied to@stagas🤸profilefollow
creative technologist
creator of textlog:
creative technologist
creator of textlog:Absolutely! I think separating HTML, CSS, and JS into separate files was a mistake. Web components would have succeeded far more if they had gone with the single-file component idea that so many web frameworks are converging on. I think it barely made sense in the Web 1.0 days — certainly not in the era of Web applications.