[fpc-devel]a 'rises' keyword proposal

Aleksey V. Vaneev picoder at sbis.komi.ru
Wed Jan 23 17:09:52 CET 2002


Hello,

  Maybe my suggestion is outdated, but is it possible to add some
  keyword like 'rises' to function/method/procedure declarations?

  This way sources will become more self-documenting and much more
  predictable. In fact in C++ something like that (although, in a not
  very useful manner) already presents and I've always used it when
  programmed in C++.

  So, by default when 'rises' keyword is not declared in
  function declaration, no exception drops are allowed in that function.
  Along with that inside such function no other function calls that
  drop exceptions are allowed. This functionality of course will
  require some major update in user sources and some updates in
  RTL sources (only those functions that rise exceptions like
  EOutOfMemory), so I think it will be wise to add some command-line
  option to disable such behaviour or vise versa.

  Please, this is very essential I think.

Best regards,
 Aleksey                          mailto:picoder at sbis.komi.ru






More information about the fpc-devel mailing list