Hacker News new | ask | show | jobs
by kickingvegas 5 days ago
Sure. My reference to BIBO borrows the idea from control theory that if you put bounds on your input, your output will likewise be bounded given your system is BIBO-stable. Applying this to software, if you constrain the range of input to values that will be correctly processed, then you could exploit this to write less code (example: relax building type-checking and error handling code if you know the input is going to be an integer). I’ll caveat that this is not guidance, but more observation, particularly for the case where the audience is one as opposed to many.
1 comments

This makes total sense, thank you. I come from a Python background and appreciate a similar philosophy in Ruby, which is that sometimes it's just nicer and easier to not do typing. It's okay to prioritize aesthetics and ease in code.

I've gone much deeper into type checking since then, but I still like simple, dynamic scripting.

I've heard "functional core, imperative edges" and I feel like that kind of applies to static vs dynamic. I think there's a lot of cases where exposing a scripting language is a perfectly sane and good design pattern.

I'm not sure Emacs fits that category, hah, but it's just so dang useful.

I had not heard of control theory, I appreciate this