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

> As an example, the following pseudo-code:

  begin dishwashing:
    gather(plates)
    sink.load(plates)
    each plate(rinse)
    each plate(dishwasher.load)
    dishwasher.on()
  end dishwashing
I guess this is the problem with "low code". An actual dishwasher program would maybe look something like:

    /* Setup some arcane registers and timers */
    ...
    init_program (&setup); while (state == WASHING);
    // enable_pump (78); while (state == PUMPING); // 62 too fast - Fred 2007
    // enable_pump (81); while (state == PUMPING); // For Peru market - Kim 2011
    enable_pump (1); enable_pump (1); enable_pump (1); // Relay maybe stuck tickle it
    enable_pump (11); while (state == PUMPING); // ???
    enable_pump (99); while (state == PUMPING);
    ...
But obviously without the comments. Sooner or later many programs need complex state machines and some order at the language level the keep our sanity.


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

Search: