Slides from a recent talk of mine (at a game engin...
# share-your-work
w
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
"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
amazing - very much like your approach
w
@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
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
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
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
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
video version:

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