Exception Oriented Programming

Материал из fidoman.ru
Версия от 05:38, 7 января 2024; Sergey (обсуждение | вклад) (Новая страница: «= Program as the exception handler = Everything is exception: * program start * signals * async io event * exceptions themselves Also there is need of compl...»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)

Program as the exception handler

Everything is exception:

* program start
* signals
* async io event
* exceptions themselves

Also there is need of complex exception conditions handlers

Like this

on Start:

 raise Output("Hello world")

what about loops?

on Start:

 raise Loop(10)

on Loop(0):

 raise Output("done")

on Loop(n>0):

 raise Output("n=", n) & Loop(n-1)

that means that we need to raise many exceptions in one handler

And process complex conditions to run handler