Evolving programming languages in the AI era

(dashbit.co)

36 points | by pjm331 2 days ago

7 comments

  • spankalee 43 minutes ago
    This part:

    ---

    - Correct by construction: the language makes invalid states or programs hard or impossible to express.

    - Statically established: types, proofs, and static analysis establish properties before execution.

    - Runtime-enforced: memory management, isolation, capability boundaries, and other runtime enforced properties.

    - Empirically validated: program validation through tests, property-based testing, and fuzzing.

    ---

    Along with being familiar, so it's easy to generate, is a huge part of why I'm building Zena: https://zena-lang.dev/

    I don't have the AI-first rationale put into the public docs well just yet, but I mention some of it here: https://zena-lang.dev/guide/why-zena/#familiar-to-humans-and...

    along with a doc in the repo on this topic: https://github.com/elematic/zena/blob/main/docs/design/ai-fi...

    In short, the more deterministic, automated, checks the better. AI can deal with a pedantic language. I intend to add statically verified structured concurrency, units of measure, contracts, and eventually more and more formal methods into the language so it can be a familiar TYpeScript-like base with as many static guarantees as we can fit in.

    I also think that fine-grained isolation, which Zena gets via Web Assembly, is critical for limiting the capabilities of generated code and the blast radius of bugs, vulnerabilities, and non-aligned behavior.

    I do have an optimistic hope that a language also optimized for humans, readability and simple semantics especially, has value in the future, even when most code is generated. We'll see about that.

    • ryuuseijin 17 minutes ago
      I love this. I was thinking about a "cleaned up" typescript for a while now, and this seems to be it. I believe this can work better as an "ai-first" language than some other attempts I've seen that try to reinvent the language from scratch.

      One thing I would love to have as a feature is native compilation.

    • demibabs 22 minutes ago
      A programming language for agents seems ill-conceived in my opinion bc agents will naturally be bad at it due to a lack of examples.
      • ryuuseijin 14 minutes ago
        I think starting with a familar typescript-like base language is a good approach to this. This should be familiar enough for LLMs for the most part as long as additional features can be explained in a succinct system promopt/skill.
      • whattheheckheck 8 minutes ago
        This keep getting repeated. So were just stuck with whatever we have at the point of training the magic plagiarism machine?

        The future is cooked

  • m3kw9 28 minutes ago
    Languages for AI era should be more explicit so reviewers can read it faster.
  • imtringued 15 hours ago
    >This creates an interesting tension. Coding agents could dramatically reduce the cost of building an ecosystem while simultaneously weakening one of the forces that causes ecosystems to form in the first place.

    This is deeply unintuitive but AI negates language specific ecosystems, while strengthening language agnostic ecosystems.

    Pick whatever your favourite programming language is and its ecosystem. With AI someone can take your ecosystem and just port it to their language.

    This means the only way you can protect your ecosystem is to play on all language fronts at the same time so porting the software to another language becomes a meaningless exercise.

    • andriy_koval 2 hours ago
      > With AI someone can take your ecosystem and just port it to their language.

      I don't think its that "just". Examples of porting we seen had some prerequisites: being self contained with very strong tests coverage, so AI could iterate N millions times and fix bugs in new implementation. Otherwise such porting could be very buggy and unmaintainable.

      • 3eb7988a1663 2 hours ago
        Don't all of "serious" programming languages meet that bar? Java, C#, Go, Python, etc all have enormous test suites. Once you get into the third party, things become much more uneven, but if you can restrict yourself to say the top N packages in a language, those are going to have better than average development practices which makes that plausible.
        • andriy_koval 2 hours ago
          > Once you get into the third party

          year, that's usually what is referred as ecosystem.

    • doginasuit 30 minutes ago
      > AI negates language specific ecosystems ... Pick whatever your favourite programming language is and its ecosystem

      I think this is only true when it comes to LLM raw output. There's also the concern of checking its work. A compiler that can check many aspects of correctness (static types, null) is a huge boost to AI. It can use the compiler directly to check its own work.

    • pjm331 2 hours ago
      I’m not sure. my read of this was that AI weakens human ecosystems in general because we don’t need to work together as much when we are all just working with AI separately, but maybe you have specific examples of language agnostic ecosystems in mind? I’m struggling to imagine what that would look like
      • verdverm 2 hours ago
        maybe more like an ecosystem around a framework implemented in multiple language SDKs, here are two I use

        https://adk.dev/

        https://docs.dagger.io/reference/sdks

        both can invoke modules written in other languages from your language of choice

        Kubernetes is likely an interesting ecosystem to consider under this lens too

    • jacquesm 2 hours ago
      Why even assume that the most optimal programming languages for agentic coding are the ones that humans use? Maybe operate on ASTs directly? Some other form of programming that humans would find hard but that is a good fit for LLMs?
      • landdate 27 minutes ago
        LLM's are trained on human code though. Converting the code to its ast tree and training ai on that would be trivial of course, but I imagine there would be information that explains why something exists that would be missed.
      • jerf 8 minutes ago
        I don't care if it's optimal for them. It's clearly good enough. We have, in hand, the ultimate in auditable AI output. We may not be able to audit how it got to the code it delivered, but it is really quite good at delivering code we can read. It would be very silly for us to give it up so that they can be somewhat more efficient or something, if they even would necessarily be that much more efficient.

        To the point that I would support banning the creation of an AI-only language that can't be read by humans. Huge, huge, huge step in the wrong direction.

        ...

        Naturally, it is probably inevitable.

        But it's still a terrible idea.

      • refactor_master 1 hour ago
        AI still makes mistakes on code with a trillion billion examples, but let’s invent a DSL that only AI can read and hope for the best?
        • jacquesm 1 hour ago
          Yes, because that code was never written to be understood by machines, merely to be mechanically translated. Software is a very messy set of layers of leaky abstractions trying to express reasonably well defined ideas. Humans can't write code without mistakes, in spite of all the examples out there. If they could compilers wouldn't have to emit error messages.
      • kloop 2 hours ago
        Because human review is a serious bottleneck and optimizing something that isn't the bottleneck isn't helpful
      • conartist6 35 minutes ago
        Right on every count except that it needs to be bad for people
  • rrook 24 minutes ago
    [dead]
  • Ozzie-D 37 minutes ago
    [flagged]