Dne 28.4.2014 09:52, Nikos Mavrogiannopoulos napsal(a):
On Sun, 2014-04-27 at 23:02 +0100, Andrew Price wrote:
On 24/04/14 15:13, Lennart Poettering wrote:
We probably should make setjmp()-freeness a requirement for
all code included in Fedora.
I love the idea, but ...
Would it be worth the effort, and how feasible is it anyway?
setjmp and longjmp are tools, that one may use in a good or bad way.
Along the same lines one could argue for dropping programs that use goto
in Fedora (because everyone knows that goto is bad).
To the point, if a program uses setjmp and longjmp it is often that
there was no other way to do it. You cannot for example have a
co-routine/fiber implementation in C without setjmp() and longjmp().
For example, Ruby is using setjmp/longjmp to implement continuation [1],
although I must admit it is quite a mess and it causes issues from time
to time.
Vít
[1] https://github.com/ruby/ruby/blob/trunk/cont.c
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct