Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My solution to this problem is to focus on structure and references only. Eliminate inheritance and other conventions. Have functions as first class citizens and procedures as first class citizens too.

A procedure is essentially just a block of code. It takes no input and returns no output. In a lexically scoped language with block scope then procedures provide scope no differently than functions. If procedures can be called from a variable reference then imagine how clear the code becomes.

Example

    if (something > something_else) procedure_here else other_procedure;
Other example

    let old = {whatever;};
    let young = {young_stuff;};
    if (age > 40) old else young;
The program code suddenly becomes more declarative to read than most declarative languages/conventions. Don't be fooled as this is still highly imperative.

When reading code becomes more narrative and less syntax it becomes more visual the same way reading books becomes more visual with practice reading books. For some people programming is already incredibly visual. It is for me, but not most people.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: