D mentioned in the Koka language book
Paulo Pinto
pjmlp at progtools.org
Tue Mar 10 11:02:28 UTC 2026
On Tuesday, 10 March 2026 at 10:09:35 UTC, Kapendev wrote:
> On Monday, 9 March 2026 at 23:53:32 UTC, H. S. Teoh wrote:
>> On Mon, Mar 09, 2026 at 04:43:10PM -0700, Walter Bright via
>> Digitalmars-d wrote:
>>> On 3/9/2026 3:48 AM, Dejan Lekic wrote:
>>> > While searching the Internet for "algebraic effect systems"
>>> > I fould this beautiful language called "Koka", and got
>>> > curious. They have a nice book that, believe or not,
>>> > references the D programming language here:
>>> > https://koka-lang.github.io/koka/doc/book.html#sec-with
>>> >
>>>
>>> Thanks for the reference! They then go on to not attribute
>>> the with statement to D!
>>
>> Because D didn't invent the with-statement?
>>
>>
>> T
>
> I think Pascal uses it just to avoid some typing, but D can
> also use it for resource management with RAII.
> No idea what the context here is because I did not read the
> blog lol.
Not only Pascal, most Wirth languages, and besides the type
saving, in Oberon-2 ( and its descendents is used for type guards.
WITH v: T DO
statements (* v is treated as type T here *)
END
Multiple cases are also possible.
It appeared in several structured BASICs during the 1990's, a
famous one being Visual Basic,
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-basic-6/aa266330(v=vs.60)
In Python as resource management, it was introduced in 2005.
D might have invented a few things, but not everything is taken
from D, as it often comes up.
More information about the Digitalmars-d
mailing list