News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by SAI_Peregrinus on Wednesday October 04, 2023 @11:19AM (#37766457)
I want a shell scripting language that allows a max line length of (for example) 128 characters and a max script length of (for example) 128 lines, with no `source` equivalent. If the script expands to not be a "small, focused" single-file script it should just fail to run at all. Just enough for small utilities, but unusable for giant monstrosities.
Re:Strong typing, a hill I'm willing to die on by KMag on Wednesday October 04, 2023 @12:07PM (#37767211)
... and unable to call external programs or communicate with external programs via pipes / sockets / etc.?

Otherwise, if you're unable to source another script, you could just have another script return a normal result in addition to a JSON blob of the environment variable changes the caller should make, which is probably worse than just allowing sourcing.

Pipes allow arbitrarily complex networks of communicating sequential processes. In some cases, networks of tiny CSPs are cleaner, but without discipline, they can rapidly become worse than huge monoliths.

Re:Strong typing, a hill I'm willing to die on by SAI_Peregrinus on Friday October 06, 2023 @09:54AM (#37790833)
I suppose I should just say "any sourced file counts against the length limits".
Re:Strong typing, a hill I'm willing to die on by KMag on Friday October 06, 2023 @11:20AM (#37791971)
That doesn't prevent the problem of length limits encouraging users to break their programs into networks of smaller programs communicating over pipes. I'm sure that sort of thing can be done well, but it certainly takes discipline.

Particularly as programs start out simple and organically grow, once they start hitting length limits, they're going to start evolving into locally-distributed computation. Maybe you get something nice like composable small unix-like utilities. However, I suspect there's a large overlap between the set of developers who would do that well and the set of developers who would still keep things nice and modular within a single process if they didn't have size limits.