frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Ask HN: Do we need a language designed specifically for AI code generation?

3•baijum•10h ago
Let's run a thought experiment. If we were to design a new programming language today with the primary goal of it being written by an AI (like Copilot) and reviewed by a human, what would its core features be?

My initial thoughts are that we would trade many of the conveniences we currently value for absolute, unambiguous clarity. For example:

- Would we get rid of most syntactic sugar? If there's only one, explicit way to write a `for` loop, the AI's output becomes more predictable and easier to review.

- Would we enforce extreme explicitness? Imagine a language where you must write `fn foo(none)` if there are no parameters, just to remove the ambiguity of `()`.

- How would we handle safety? Would features like mandatory visibility (`pub`/`priv`) and explicit ownership annotations for FFI calls become central to the language itself, providing guarantees the reviewer can see instantly?

- Would such a language even be usable by humans for day-to-day work, or would it purely be a compilation target for AI prompts?

What trade-offs would you be willing to make for a language that gave you higher confidence in the code an AI generates?

Comments

dtagames•7h ago
LLMs don't work the way you think. In order to be useful, a model would have to be trained on large quantities of code written in your new language, which don't exist.

Even after that, it will exhibit all the same problems as existing models and other languages. The unreliability of LLMs comes from the way they make predictions, rather than "retrieve" real answers, like a database would. Changing the content and context (your new language) won't change that.

baijum•3h ago
That's a very fair and critical point. You're right that we can't change the fundamental, probabilistic nature of LLMs themselves.

But that makes me wonder if the goal should be reframed. Instead of trying to eliminate errors, what if we could change their nature?

The interesting hypothesis to explore, then, is whether a language's grammar can be designed to make an LLM's probabilistic errors fail loudly as obvious syntactic errors, rather than failing silently as subtle, hard-to-spot semantic bugs.

For instance, if a language demands extreme explicitness and has no default behaviors, an LLM's failure to generate the required explicit token becomes a simple compile-time error, not a runtime surprise.

So while we can't "fix" the LLM's core, maybe we can design a grammar that acts as a much safer "harness" for its output.

dtagames•21m ago
I would say we have this language already, too. It's machine code or its cousin, assembler. Processor instructions (machine code) that all software reduces down to are very explicit and have no default values.

The problem is that people don't like writing assembler, which is how we got Fortran in the first place.

The fundamental issue, then, is with the human language side of things, not the programming language side. The LLM is useful because it understands regular English, like "What is the difference between 'let' and 'const' in JS?," which is not something that can be expressed in a programming language.

To get the useful feature we want, natural language understanding, we have to accept the unreliable and predictive nature of the entire technique.

muzani•6h ago
Generally they work better with words that are more easily readable by humans. They have a lot of trouble with JSON and do YAML much better, for example. Running through more tokens doesn't just increase cost, it lowers quality.

So they'd likely go the other way. It's like how spoken languages have more redundancies built in.

theGeatZhopa•5h ago
What's needed is a formalization and that formalization to been trained on. In not sure if systemprompt alone is powerful enough to check and enforce input as definite and exact formalized expression(s).

I don't think it will work out easily like "a programming language for LLM" - but you can always have a discussion with ol' lama

Poly-metabolite scores for diets high in ultra-processed food

https://journals.plos.org/plosmedicine/article?id=10.1371/journal.pmed.1004560
2•PaulHoule•59s ago•0 comments

The Illusion of Thinking: Strengths and Limitations of Reasoning Models

https://machinelearning.apple.com/research/illusion-of-thinking
2•mpweiher•2m ago•0 comments

What drives differences in life expectancy between the U.S. and other countries?

https://www.healthsystemtracker.org/chart-collection/what-drives-differences-in-life-expectancy-between-the-u-s-and-comparable-countries/
2•enceladus06•2m ago•0 comments

The bad boy of bar charts: William Playfair

https://blog.engora.com/2023/05/the-bad-boy-of-bar-charts-william.html
1•Vermin2000•7m ago•0 comments

Electricity Data Explorer

https://ember-energy.org/data/electricity-data-explorer/
1•hunglee2•9m ago•0 comments

AI interpretability is further along than I thought

https://www.seangoedecke.com/ai-interpretability/
1•emschwartz•10m ago•0 comments

The Tools of Martin Löffelholz (1505)

https://thomasguild.blogspot.com/2016/08/the-tools-of-martin-loffelholz-1505.html
1•lqet•12m ago•0 comments

If it works, it's not AI: a commercial look at AI startups (1999)

https://dspace.mit.edu/handle/1721.1/80558
9•rbanffy•16m ago•1 comments

BTC Mesh: Sovereign Communication and Off Grid Bitcoin Transactions

https://world.eddieoz.com/post/btc-mesh-sovereign-communication-and-off-grid-bitcoin-transactions-08xiz1/
1•eddieoz•23m ago•0 comments

RFC: FSF40 Hackaton Idea: Opening Untrusted Documents with Emacs+Syd

https://lists.libreplanet.org/archive/html/libreplanet-dev/2025-06/msg00000.html
1•hayali•30m ago•1 comments

The Field of Education Is Due for a Copernican Revolution

https://www.justinmath.com/the-field-of-education-is-due-for-a-copernican-revolution/
2•JustinSkycak•37m ago•0 comments

Getting C++ Hello World working on Windows (a comedy && tragedy)

https://sdegutis.github.io/blog/creating-cpp-hello-world.html
2•90s_dev•38m ago•0 comments

Rednote Release Dots.llm1 Model

https://github.com/rednote-hilab/dots.llm1
1•samuel246•38m ago•0 comments

Warrior skeletons reveal Bronze Age Europeans couldn't drink milk

https://www.science.org/content/article/warrior-skeletons-reveal-bronze-age-europeans-couldn-t-drink-milk
1•XzetaU8•42m ago•1 comments

Musk-Trump dispute includes threats to SpaceX contracts

https://spacenews.com/musk-trump-dispute-includes-threats-to-spacex-contracts/
2•rbanffy•44m ago•0 comments

Fate of 23andMe genetic data still not settled amid bankruptcy fight

https://www.washingtonpost.com/business/2025/06/05/23andme-bankruptcy-auction-bidding/
1•bookofjoe•44m ago•1 comments

OpenTofu Becomes the Real Deal

https://www.infoworld.com/article/3852167/opentofu-becomes-the-real-deal.html
1•belter•44m ago•0 comments

What was Radiant AI, anyway?

https://blog.paavo.me/radiant-ai/
4•paavohtl•46m ago•0 comments

Caffeine Keeps Your Brain "Awake" Even While You Sleep, Study Finds

https://scitechdaily.com/caffeine-keeps-your-brain-awake-even-while-you-sleep-study-finds/
16•sys42590•50m ago•4 comments

Show HN: Prijm – distraction free link sharing and personalized feed

https://prijm.com/
1•rakibtg•52m ago•0 comments

The Agenda: Their Vision, Your Future

https://dhughes.substack.com/p/the-agenda-their-vision-your-future
1•ambientenv•55m ago•0 comments

The story of how Boulder Dash was created

https://spillhistorie.no/2025/06/06/how-boulder-dash-was-created/
1•elvis70•58m ago•0 comments

Lossless data compression by large models

https://arxiv.org/abs/2407.07723
1•vitplister•1h ago•0 comments

The UK doesn't have a Productivity Puzzle

https://www.ft.com/content/583a30e1-f411-40b2-bf60-8102634a6a3c
4•rwmj•1h ago•4 comments

Winning 4x4x4 tic-tac-toe by consulting an oracle

https://quuxplusone.github.io/blog/2025/06/02/4x4x4-tic-tac-toe/
2•gsky•1h ago•0 comments

AI will colonize the galaxy in 2030

https://fortune.com/2025/06/06/google-deepmind-ceo-demis-hassabis-ai-smarter-than-humans-space-colonization-robot-nurses/
2•majkinetor•1h ago•0 comments

Show HN: dbSurface – A Developer Tool for pgvector

https://github.com/dbSurface/dbSurface
1•z-gort•1h ago•1 comments

Gemini-2.5-pro-preview-06-05 performance on IDP Leaderboard

https://idp-leaderboard.org
2•souvik3333•1h ago•0 comments

When Profit Overshadows Community: A Look at Golang Conferences

1•gophercon•1h ago•0 comments

Can We Save Commodore? My Biggest Project yet [video]

https://www.youtube.com/watch?v=lN8r4LRcOXc
3•bauta-steen•1h ago•0 comments