$ emacs -Q --eval "(let (v) (while t (setq v (cons v v))))"
In response to how such deep structures can arise: They may for example arise when testing Emacs with randomly generated code snippets. For testing edge cases, it is highly desirable that Emacs run robustly also in such situations. has_type(_, true, bool).
A better name for this would be: term_type(_, true, bool).
or even: context_term_type(_, true, bool).
This makes clear what each of the arguments means, and does not limit the reading to only one direction of use. Note that we can query this also in other directions, and the predicate still makes sense! notice_persons_at(Place) :-
person_at(X, Place),
write('Apparently '),
write(X),
writeln(' is here, that is your'),
writeln('chance for a quick chat. Type "\e[1mtalk.\e[0m" to start'),
writeln('start the conversation').
Consider formulating this declaratively, for example as follows: notice_persons_at(Place) -->
{ person_at(X, Place) },
['Apparently ',X,' is here, that is your ',
'chance for a quick chat. Type ', bold(talk), 'to start',
' the conversation'].
I am using a Prolog definite clause grammar (DCG) to describe the output that is expected to occur at this place. Since I am decoupling this description from the actual side-effect of emitting the output, I have won a lot of convenience, flexibility and versatility. You see that this description is shorter and can be used not only for actually emitting the output, but also to easily test whether the program (still) behaves as intended.
If it cannot allocate more memory, I expect it to throw a Lisp exception that tells me so, not to crash the whole process.
I greatly appreciate Daniel's work to increase the robustness of Emacs, because it means that there will be fewer situations where a process crash leads to lost work for users. In addition, increasing the robustness of Emacs in such cases will also greatly broaden the set of test cases that can be run reliably, and hence help to detect and correct even more issues.