A programming language idea: no static code, explicit caller context (Kite)

Marconi soldate at gmail.com
Sun May 3 18:46:08 UTC 2026


On Saturday, 2 May 2026 at 14:11:07 UTC, H. S. Teoh wrote:
> On Sat, May 02, 2026 at 01:42:11PM +0000, Marconi via 
> Digitalmars-d wrote:
> [...]
>
> Wow, this makes code incredibly hard to follow.  Instead of 
> being like C, where you know everything must be manually freed, 
> or a GC language where you know everything is automatically 
> cleaned up, here you have to carefully read through every line 
> of a function just to determine whether an object was allocated 
> on the stack or on the heap.  The declaration doesn't help 
> because the declared type does not differentiate between stack 
> or heap allocation.
>
> T

After thinking and thinking and thinking... You're right!

```c
node n; // heap by default -> call on_heap method
stack node n; // explicit stack
```

That's it. Thanks!

I think I've gone crazy. :-D

Note: With the help of chatgpt 5.5, I'm writing a transpiler for 
C, so we'll be able to test it soon.


More information about the Digitalmars-d mailing list