· Marco Rapaccini · Research  · 4 min read

We asked LLMs what Programming Language they would design

We ran an interesting experiment, asking major LLMs what kind of programming language they would design for machine-to-machine interaction

We ran an interesting experiment, asking major LLMs what kind of programming language they would design for machine-to-machine interaction

How It Started

The experiment started from this post from Michele Riva - Cofounder & CTO at Orama on LinkedIn:

If LLMs had to come up with a programming language that’s optimized for them (machines) rather than us (humans) they’d probably come up with an APL dialect

After reading Michele’s opinion, our first initial guess was that this hypotethical programming language - that we’ve decided to call NextLang would be:

  • event-driven
  • declarative
  • using a binary syntax

So, we thought:

Why don’t we ask LLMs?

The results are quite fascinating.

This article is a summary of our findings, but you can read the full response from the major LLMs in this dedicated repo.

Prompt

You're an experienced software architect in charge of designing from scratch a new programming language - called NextLang - for the next generation of LLMs.

NextLang enables LLMs/AI tools to work with other AI tools (aka other machines), write software, and orchestrate complex architectures, without any kind of human intervention.

NextLang needs to be efficient for machine-to-machine interaction.

Explain why you would make certain architectural decisions while designing NextLang.

Help me to understand the main aspects of NextLang by describing it with examples and by comparing it with pre-existing human-readable programming languages.

Major Findings

LLMs’ Shared Vision

Most LLMs seem to agree on the following key architectural decisions:

  • Machine Efficiency
    • Machine-2-Machine communication should be prioritised over human readability
  • Declarative Approach
    • Specifying what to achieve is more important than how to achieve it
  • Static Typing
    • Strong, explicit typing ensures communication reliability
  • Concurrency
    • AI cooperation needs native support for async and parallel operations
  • Semantic Precision
    • Ambiguity is not allowed, no margin for interpretation errors
  • Self-describing Data Formats
    • Embedded metadata improving interoperability
  • Security
    • Built-in security for autonomous AI interaction

Key Differentiators

  • Claude focused on knowledge representation with ontologies and inference rules
  • Grok proposed a minimalist syntax and AI-specific primitives for machine efficiency
  • Gemini introduced a system allowing AIs to advertise capabilities to other AIs
  • ChatGPT explained orchestration primitives and binary optimisations
  • Llama had a minimalist approach with a great focus on integrating knowledge graphs
  • DeepSeek enphasised system interoperability using native protocols and foreign function interfaces

Comparative Table

FeatureClaudeDeepSeekGeminiGrokLlamaOpenAI ChatGPT
Core ParadigmIntent-based, declarative programming with semantic precisionJSON-like declarative syntax with strict schemasS-expressions for structured, semantically rich data streamsMinimalist functional approach with compact syntaxMinimalist syntax with strong typingBinary-optimized serialization with explicit orchestration
Type SystemType system based on semantic meaning, beyond structural typingStrict+dynamic hybrid with runtime flexibilityStrong, static typing with self-describing dataStrong typing with native data structuresStrong, static typingGradual typing with protocol contracts
Control FlowContext-aware execution, self-modifying capabilitiesAuto-parallelism, stateful workflowsDeclarative, event-driven with explicit state machinesFirst-class concurrency and asynchronous executionNative support for asynchronous operationsSpawn, await, select primitives
Knowledge RepresentationNative knowledge representation (ontologies, relations)Interoperability first with embedded foreign functionsCapability discovery and registrationAI-specific primitivesIntegration with knowledge graphsComposable DSL layers
Error HandlingBuilt-in verification and reasoningAuto-retry and rollback featuresStandardized error codes and rich error reportingRobust error handling with retries and fallbacksNot extensively detailedSelect statement with timeout and fallback
SecurityCross-domain translation layerSecurity and autonomy by designZero-trust model with fine-grained permissionsBuilt-in security featuresNot extensively detailedExplicit effect annotations (@io)
Execution ModelHybrid with declarative, optimization, and runtime layersAuto-optimizing compilerProtocol negotiation for communicationSelf-modification capabilitiesSelf-optimizationBinary-first tokenization
Sample Syntax ExampleS-expression-like with explicit constraintsYAML-like declarative structureDeeply nested S-expressions with rich metadataFunctional notation (COND, ASYNC)Fn-prefix, arrow syntaxBinary messages with explicit annotations

Additional Thoughts

The analysis shows us that LLMs can share a vision and the related goals but, as humans, they seem to differ on the actual implementation.

We were expecting a focus on machine efficiency and AI tools interoperability, while what really surprised us was the proposed integration/usage of knowledge graphs and ontologies.

This means that LLMs are somehow aware that without knowledge graphs they have a limited understanding of the world, because they would lack a unified view of the existing information.

An interesting lesson for programmers comes from the fact that LLMs prefer strong static typing because it reduces issues within communication. Generally speaking, programmers use strongly typed programming languages for an early error detection (thank you, Mr Compiler), but machines seem to like them because they help to improve communication between systems.

LLMs proposed native protocols for communication, confirming the AI community’s growing interest in MCP and A2A.

NextLang is just a thought experiment, of course.

So, a very important question remains:

Why should Artificial Intelligence design a programming language?

Well, we’re leaving answering this question to you!

Back to Blog

Related Posts

View All Posts »