https://futureofcoding.org/ logo
w

Wouter

06/11/2023, 5:58 PM
Slides from a recent talk of mine (at a game engine/rendering conference, but is actually very much about programming language design/impl as it relates to game engines), video still forthcoming: https://twitter.com/mirror2mask/status/1667757561960103936
m

Mariano Guerra

06/11/2023, 7:37 PM
"Bla, a more academic language where stack frames and objects where the same interchangeable things!" I had that idea once 😄 do you have anything to recommend about stack frames? I find it's a thing that most programming languages "take for granted"
o

Oleksandr Kryvonos

06/11/2023, 9:07 PM
amazing - very much like your approach
w

Wouter

06/11/2023, 10:26 PM
@Mariano Guerra yeah it's not a first class citizen in almost all languages.. I guess the classical language to look into for "stack frames as objects" is continuations in scheme, but even there they a bit implicit about the link, in the Bla language you had an explicit
self
reference to the stack frame
k

Konrad Hinsen

06/12/2023, 6:07 AM
In Pharo (descendent of Smalltalk 80 via Squeak), stack frames are plain objects. You can access (inspect, even modify) the current stack frame as
thisContext
anywhere you like. It is mostly used by debugging tools and exception handlers, but I suspect that more creative uses have been envisaged.
m

Mariano Guerra

06/12/2023, 6:29 AM
In python it's not hard to access them and are very OO but they are really similar to any other stack frame in other languages, I think having them first class and adding functionality to them would be useful, for example adding metadata to make debugging and stack traces more useful
k

Konrad Hinsen

06/12/2023, 9:01 AM
Python provides some access, but Python stack frames are hardly first-class objects. For comparison: in Pharo, you can serialize a stack frame object, then deserialize it elsewhere and do some debugging.
w

wtaysom

06/13/2023, 6:41 AM
Thinking of Scheme, continuations have the same flavor as lambda in that they capture something and then put it in a black box. I came to respect the Scheme Report for steering clear of features requiring implementations to be dynamic.
w

Wouter

06/27/2023, 4:46 AM
video version:

https://www.youtube.com/watch?v=TOnhqoUxLy0&list=PLAOytOz0HZbJzO8xwDTCQA4cubNzzc2mH&index=2