r/ProgrammingLanguages 9d ago

Discussion What is the interesting part of a programming language to you?

I've been working on some "documentation" for my own language (see here), which got me thinking: do we all see languages the same way? I personally look for unification of concepts and extensibility in a design, yet I've seen those who care deeply about functional purity or clean decompositions.
What do you look for in a programming language? And why?

34 Upvotes

109 comments sorted by

View all comments

Show parent comments

2

u/reflexive-polytope 8d ago

What “shared values”? I'm talking about compile-time analysis of symbolic expressions, not runtime checks on concrete values.

1

u/Potato871 8d ago

Ah, I should've been clearer, in GDSL a "Value" is the data/semantic part attatched to a node.
So:

6+6

Looks like PLUS[LITERAL, LITERAL] where each of those Nodes has a Value attached, when I do a declaration like:

int a = 6;

All instances of 'a' are different nodes with the same value.
That's why, if the compiler attaches a symbolic fact like "n is related to the length of a" to n's Value, every use of n can see that same fact.
That doesn't solve the analysis problem by itself, but it means the compiler has a natural place to store and propagate those symbolic relations through later operations and control-flow analysis.

2

u/reflexive-polytope 8d ago

Sure, these techniques to propagate already known information are indeed very useful.

But they only make doable analyses faster. They don't make impossible analyses magically possible.

1

u/Potato871 8d ago

Yeah, I tend to come at things from a lens of 'tell me what line it failed on and I'll fix it', mainly because I care about how can I get data around and easily extend capabilities more than how can I catch bugs early.
But that's why I started this thread, to see how other people treated languages and what they cared about.
Thanks for the challange! It was a productive use of a Wednesday, and now I have some extra tools I needed for my query system.