I've been envisioning a future programming environment that automatically aids in code readability by hiding unnecessary information when you're not using it. Manual code folding was sort of a first step, but this environment would take it further by hiding things like types until you need them. So something like
proc eval(c: Criterion, token: Token): bool =
let tokenCrit = (token.identifier, token.token)
return tokenCrit == c
Might look like proc eval(c, token) =
let tokenCrit = (token.identifier, token.token)
return tokenCrit == c
Or even proc eval(c, token) =
...
return tokenCrit == c
It would have to be smart enough to expand the hidden blocks when you need them and in an unobtrusive way. It's also possible that the type declarations wouldn't actually expand in this editor, but would be set by some sort of popup selector (similar to how autocomplete works, but you'd select the variable type).This is just a rough idea and I'm not sure how well it works in reality. But when code starts looking like `proc add*[T](root: var BinaryTree[T], n: var seq[BinaryTree[T]]) =` it starts to lose its at-a-glance readability.