<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 4/10/23 3:46 PM, Juan Vuletich
wrote:<br>
</div>
<blockquote type="cite" cite="mid:64341348.2050005@cuis.st">On
4/8/2023 7:45 PM, Gerald Klix via Cuis-dev wrote:
<br>
<blockquote type="cite">Hi all, Hi Juan,
<br>
<br>
Is there a chance, that you may accept this little change set?
<br>
It brings back `self break`, to which I got used over time,
<br>
using Squeak, Pharo and Cuis.
<br>
<br>
Needless to say, that added some improvements.
<br>
<br>
<br>
HTH and Best Regards,
<br>
<br>
Gerald
<br>
</blockquote>
<br>
Nice. But this serves the same purpose as #halt, right? Does it
make sense to have both? Does your implementation have any other
advantage besides saving a couple of clicks in the debugger? Is
forking a new process needed?
<br>
<br>
Thanks,
<br>
<br>
</blockquote>
Well,<br>
it has one, probably tiny, advantage:<br>
The stack frame with the <tt>#break</tt>-send is not displayed.<br>
I considered it a bit annoying, that I have to step over this<br>
stack-frame – that's what I believed.<br>
<br>
However during the course of the implementation<br>
of <tt>#break</tt>, I found that there is code that enables the<br>
debugger to 'single-step' and 'step over'<br>
in all frames, not only in the top-frame.<br>
(I used the debugger to single-step the debugger)<br>
I hope this cool feature is documented somewhere<br>
and I fear that I overlooked it in a every other<br>
Smalltalk I used so far.<br>
<br>
<br>
There is also another feature, that may be an advantage<br>
or a big nightmare: The implementation isn't based<br>
on exceptions, you can not 'subvert' it with an<br>
exception handler.<br>
<br>
<br>
Concerning <tt>#halt</tt>, its category talks about errors,<br>
not about debugging. We should have a common<br>
understanding of the pragmatics of halt vs. break.<br>
(Operational) semantics are clear, as you pointed<br>
out: Both leave you in the debugger.<br>
<br>
There are several sends of <tt>#halt</tt> in the pristine<br>
Cuis image. IHMO most signal some unspecified<br>
error condition. See <tt>Morph>>#copyForClipboard</tt><br>
for a counter-example :-}<br>
<br>
<br>
Just my 1€,<br>
<br>
Gerald<br>
</body>
</html>