logoalt Hacker News

Towaway69yesterday at 7:43 PM2 repliesview on HN

That's a very good point. My experience is that for large project the architecture also becomes important.

Large project have much code but if you can split out responsibility because your architecture allows this, then you keep your code concise.

One feature Ruby has that helps here is creating Domain Specific Language without yacc or lex. This allows for concise code where its needed.


Replies

SatvikBeriyesterday at 9:55 PM

Not quite the same, but I find "data-oriented programming" to be a very strong method for managing large codebases. By that I mean having data structures that designate the end state that you want, having another set of code that gets you to those end states, and maintaining a pretty clear boundary between the two.

(If you like with "Functional Core, Imperative Shell", this is a way to further divide the Functional Core.)

It works well because it narrows the surface area of a lot of possible bugs: either your configuration is wrong, or your code doing the transformations is wrong.

show 1 reply
epguiyesterday at 7:56 PM

There are languages much better suited for DSLs though.