Hacker News new | ask | show | jobs
by jonsen 4710 days ago
The next really big thing will be a language that does not mix things up.

I.e. a language that keeps a clean orthogonality between the three dimensions of a program --state, functionality, and event handling-- not favoring one over the others. The hard part is to make hierarchical modularization mechanisms work simultaneously along all three dimensions.

1 comments

Why do we need hierarchy? Grouping makes sense, but deep nesting often looks misguided from where I stand.
We need hierarchy to manage complexity. Complex functions must be decomposed into component functions. Complex data structures must be decomposed into component data objects. And event streams must be decomposed into manageable chunks. Recursively to some degree. Maybe deep nesting is only a problem because your language does not let you nest all three easily.
I use Haskell and C++ primarily. Haskell has local functions, ADTs, hierarchical modules, and good support for streaming and concurrent operations. C++ has (limited) local functions and lambdas, classes, nested namespaces, iterators, and...well, let’s not talk about imperative concurrency.

These are (mostly) good tools, but I still avoid hierarchy more than one level deep—in my experience it just introduces more complexity than it saves.