FLTK logo

OT: thread drift Re: [fltk.general] [Fl_Flow] A new layout manager for FLTK

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

OT: thread drift Re: [Fl_Flow] A new layout manager for FLTK Ian MacArthur Oct 29, 2021  
 
On 29 Oct 2021, at 13:05, 'Philip Rose' wrote:
> 
> As a matter of interest what is the issue with exceptions?


Hi Phil,

I’ve moved this into another thread, as I guess it’s OT for the Fl_Flow discussion of the most part.

Anyway, the answer is “it depends...” to some extent. 
The crux is that (and this depends somewhat on the system on which you are running, compiler, etc.) enabling exception support will *generally* increase the memory footprint as “every function” (not actually every function in practice) gets some additional structure to handle the exception events - in some cases there may be additional exception stacks allocated and so forth. The “cost” may be small, but it can mount up. There can also be some runtime cost as the function call/return may have additional steps to handle the exception state and so on.
On a modern desktop system, this probably doesn't much matter, but it can make a difference in constrained systems. 
In the early days of fltk, it was felt it wasn’t worth the cost - that was before my time, but I would generally concur with that decision.



That said, I may not be the best judge since a lot of my work is in embedded systems, so I’m not keen on C++ exceptions anyway; in an embedded system, there’s nowhere to go, in effect, so you need to handle errors at source, as far as possible - shrugging ‘em off to deal with later won’t fly! (Literally in many cases - you try to persuade a DO-178 assessor that exceptions represent valid control flow and see how far that gets you...)


-- 
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/17816412-E5C2-4A62-BDF7-BC83326481D8%40gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.