View Issue Details

IDProjectCategoryView StatusLast Update
0000792LDMud 3.6Efunspublic2023-10-02 16:26
Reporter_xtian_ Assigned ToGnomi  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version3.6.7 
Summary0000792: limited( expression ... ) would be nice
DescriptionSimilar to catch( expression ) it would be nice to have a variant of limited() in which one can simply write an expression out.

limited() is hugely helpful for securing critical code, but a limited( expression ... ) variant would help with adoption, as it would make adding a limited() around an expression as easy as adding a catch().

Example:

BEFORE:
  err= catch( ob->fun() )

AFTER (proposed):
  limited( err= catch( ob->fun() ) )
TagsNo tags attached.

Activities

zesstra

2011-11-02 09:05

administrator   ~0002076

AFAIK that needs to hacked directly into the compiler then. That would replace the efun altogether. Since that is not compatible to the current efun, we would probably need two different keywords for that.

But does it really save much effort compared to
limited(function void () {err=catch(...);} ); (faster)
limited( (: err=catch(...); :) );
?

_xtian_

2011-11-10 08:26

reporter   ~0002077

oh, hadn't thought of that.

Well, then you can probably close this item. thanks!

Gnomi

2021-04-16 19:29

manager   ~0002596

An alternative would be to add a keyword to the already existing catch(), if you want to catch and limit at the same time:
  err = catch(ob->fun(); limit 200000);

The question here is what kind of limits would be needed? The full blown limited() syntax with all in an array or single tags or just eval limits?
Do you need only reduction of the limit or also expand it (like limited() can, but that needs privileges).

Gnomi

2022-10-06 18:29

manager   ~0002690

Agreed on implementing catch(ob->fun(); limit 200000); for eval limits in catch().

Gnomi

2023-10-02 16:26

manager   ~0002709

Implemented catch(expr; limit N)

Issue History

Date Modified Username Field Change
2011-11-01 16:39 _xtian_ New Issue
2011-11-02 09:05 zesstra Note Added: 0002076
2011-11-10 08:26 _xtian_ Note Added: 0002077
2021-04-16 19:29 Gnomi Status new => feedback
2021-04-16 19:29 Gnomi Note Added: 0002596
2021-04-16 19:48 zesstra Project LDMud => LDMud 3.6
2022-10-06 18:29 Gnomi Assigned To => Gnomi
2022-10-06 18:29 Gnomi Status feedback => acknowledged
2022-10-06 18:29 Gnomi Note Added: 0002690
2023-10-02 16:26 Gnomi Status acknowledged => resolved
2023-10-02 16:26 Gnomi Resolution open => fixed
2023-10-02 16:26 Gnomi Fixed in Version => 3.6.7
2023-10-02 16:26 Gnomi Note Added: 0002709