this post was submitted on 21 Jun 2024
471 points (98.4% liked)

Programmer Humor

19667 readers
214 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
471
COMEFROM (programming.dev)
submitted 5 months ago by JPDev to c/programmer_humor
 
you are viewing a single comment's thread
view the rest of the comments
[–] starman 5 points 5 months ago

Looks like C# 12 interceptors:

[InterceptsLocation(@"C:\testapp\Program.cs", line: 4, column: 5)]

I know it looks awful, but it's not intended for direct use, but rather for source generators for native ahead of time compilation.

https://andrewlock.net/exploring-the-dotnet-8-preview-changing-method-calls-with-interceptors/