<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 小林大起</title>
    <description>The latest articles on DEV Community by 小林大起 (@_82b1d106aea639e322e2).</description>
    <link>https://dev.to/_82b1d106aea639e322e2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4182582%2F396ae1a9-3a82-47bd-9e77-288dde7ae04e.png</url>
      <title>DEV Community: 小林大起</title>
      <link>https://dev.to/_82b1d106aea639e322e2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_82b1d106aea639e322e2"/>
    <language>en</language>
    <item>
      <title>Building Quidra: A Programming Language Designed for Maximum Meaning Per Token</title>
      <dc:creator>小林大起</dc:creator>
      <pubDate>Tue, 13 Oct 2026 15:53:33 +0000</pubDate>
      <link>https://dev.to/_82b1d106aea639e322e2/building-quidra-a-programming-language-designed-for-maximum-meaning-per-token-e1h</link>
      <guid>https://dev.to/_82b1d106aea639e322e2/building-quidra-a-programming-language-designed-for-maximum-meaning-per-token-e1h</guid>
      <description>&lt;h2&gt;
  
  
  What if shorter code isn't always better?
&lt;/h2&gt;

&lt;p&gt;I'm building &lt;strong&gt;Quidra&lt;/strong&gt;, an experimental, open-source programming language guided by one idea: &lt;strong&gt;Maximum Meaning Per Token (MMPT)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal isn't to make every program as short as possible. It's to remove unnecessary ceremony while keeping the information that helps humans, compilers, and code-generating tools understand what a program actually does.&lt;/p&gt;

&lt;p&gt;Quidra is statically typed, implemented in C++20, and uses LLVM for native compilation. It isn't a Python wrapper or a transpiler to another high-level language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt; &lt;a href="https://quidra-lang.github.io/playground/" rel="noopener noreferrer"&gt;Playground&lt;/a&gt; · &lt;a href="https://github.com/quidra-lang/quidra" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; · &lt;a href="https://quidra-lang.com" rel="noopener noreferrer"&gt;Website&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Less syntax, but not less meaning
&lt;/h2&gt;

&lt;p&gt;Consider mutation. A short function call can hide an important fact: the function might change the variable you pass to it.&lt;/p&gt;

&lt;p&gt;In Quidra, mutable access to existing storage is explicit at both ends:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void increment(int &amp;amp;value)
    value += 1

int count = 7
increment(&amp;amp;count)

print(count)
print(NL)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parameter &lt;code&gt;int &amp;amp;value&lt;/code&gt; declares writable access. The call &lt;code&gt;increment(&amp;amp;count)&lt;/code&gt; makes that authority visible to the reader without requiring them to inspect the implementation.&lt;/p&gt;

&lt;p&gt;Yes, &lt;code&gt;&amp;amp;&lt;/code&gt; is an extra token. But it conveys a distinction that can affect correctness. To me, that's a good trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Assignment should not secretly create aliases
&lt;/h2&gt;

&lt;p&gt;Quidra uses value semantics for ordinary assignments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int[] original = [1, 2, 3]
int[] copy = original

copy[0] = 9
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Changing &lt;code&gt;copy&lt;/code&gt; doesn't change &lt;code&gt;original&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The compiler and runtime are free to optimize the implementation, including with copy-on-write, as long as observable behavior stays the same. The point is not to force expensive physical copies; it's to give assignment a predictable meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tensor shapes belong in contracts
&lt;/h2&gt;

&lt;p&gt;In numerical computing, many errors come from assumptions about tensor shapes that never appear in function signatures.&lt;/p&gt;

&lt;p&gt;Quidra can express shape constraints directly in a type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;real32 first_sample(const tensor&amp;lt;real32&amp;gt;{3, _, _} pixels)
    return pixels[0, 0, 0].item()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;tensor&amp;lt;real32&amp;gt;{3, _, _}&lt;/code&gt; means a tensor with &lt;code&gt;real32&lt;/code&gt; elements, exactly three dimensions, and a first dimension of size 3. The other two dimensions are unconstrained.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;const&lt;/code&gt; parameter also communicates that the function doesn't have permission to modify its argument.&lt;/p&gt;

&lt;p&gt;Shape information doesn't eliminate every runtime check. But when the compiler can prove a mismatch, I'd rather find out before running the program.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conversions should be decisions, not surprises
&lt;/h2&gt;

&lt;p&gt;Quidra distinguishes mathematical numeric types from fixed-width representations. For instance, &lt;code&gt;int&lt;/code&gt; is arbitrary-precision, while &lt;code&gt;int64&lt;/code&gt; and &lt;code&gt;real64&lt;/code&gt; have specific machine representations.&lt;/p&gt;

&lt;p&gt;Converting an existing typed value is explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int value = 10
real64 converted = real64(value)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can be more verbose than implicit promotion. That's intentional: changing a value's representation may change its range or precision, and the source code should make that decision visible.&lt;/p&gt;

&lt;p&gt;Quidra also supports &lt;code&gt;T | error&lt;/code&gt; for typed failure and &lt;code&gt;try&lt;/code&gt; for propagation, while allowing a fail-fast path when a caller doesn't need to retain the error explicitly. The aim is to make important failure contracts available without surrounding every ordinary operation with ceremony.&lt;/p&gt;

&lt;h2&gt;
  
  
  A native compiler, not just a syntax experiment
&lt;/h2&gt;

&lt;p&gt;The Quidra compiler is written in &lt;strong&gt;C++20&lt;/strong&gt; and uses &lt;strong&gt;LLVM&lt;/strong&gt; for native code generation. The project includes a REPL, JIT/AOT execution paths, diagnostics, language tooling, tensors, and automatic differentiation infrastructure.&lt;/p&gt;

&lt;p&gt;There are also separate first-party repositories for &lt;strong&gt;Math, NN, Vision, Video, and DNN&lt;/strong&gt;. Quidra is intended to be a general-purpose language, with numerical computing and machine learning as important applications—not its only use cases.&lt;/p&gt;

&lt;p&gt;You can find the implementation, specifications, and examples in the &lt;a href="https://github.com/quidra-lang" rel="noopener noreferrer"&gt;GitHub organization&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can language design make LLM-generated code more reliable?
&lt;/h2&gt;

&lt;p&gt;This is one of the questions motivating Quidra.&lt;/p&gt;

&lt;p&gt;LLMs can already write code in established languages. But syntax that is easy to produce isn't necessarily code that is easy to verify or safely modify.&lt;/p&gt;

&lt;p&gt;My hypothesis is that explicit mutation, predictable value semantics, checked numeric conversions, and visible shape and error contracts could help both developers and code-generation tools reason about programs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That is a hypothesis, not a proven advantage.&lt;/strong&gt; Meaningful comparisons will require controlled experiments and careful attention to how much existing language knowledge an LLM has already learned.&lt;/p&gt;

&lt;p&gt;I'm as interested in finding where this approach &lt;em&gt;fails&lt;/em&gt; as in finding where it works.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Quidra isn't (yet)
&lt;/h2&gt;

&lt;p&gt;Quidra is &lt;strong&gt;experimental and pre-1.0&lt;/strong&gt;. Its ecosystem, tooling, and real-world adoption are far smaller than those of Python, Rust, or C++. Some design decisions may change as the implementation and tests evolve.&lt;/p&gt;

&lt;p&gt;And explicitness has a cost: sometimes a program needs more characters. MMPT is about &lt;strong&gt;meaningful&lt;/strong&gt; tokens, not winning a character-count contest.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'd love your feedback—and contributors are welcome
&lt;/h2&gt;

&lt;p&gt;I'm particularly interested in these questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which distinctions deserve explicit syntax, and which can safely be inferred?&lt;/li&gt;
&lt;li&gt;Where would these design choices create friction in real programs?&lt;/li&gt;
&lt;li&gt;How should we measure whether a language helps people or LLMs write more reliable code?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Quidra is MIT-licensed, and &lt;strong&gt;I'm looking for open-source collaborators&lt;/strong&gt; interested in compilers, C++/LLVM, language design, developer tooling, testing, documentation, math, and ML. You don't have to be a compiler expert: there are approachable first contributions, too.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://quidra-lang.github.io/playground/" rel="noopener noreferrer"&gt;Try Quidra in the Playground&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/quidra-lang/quidra" rel="noopener noreferrer"&gt;Explore the source on GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/quidra-lang/quidra/blob/develop/CONTRIBUTING.md" rel="noopener noreferrer"&gt;Read the contribution guide&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://github.com/quidra-lang/quidra/issues/4" rel="noopener noreferrer"&gt;Join the contributor discussion&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Constructive criticism is very welcome. A language gets better when people try to break its assumptions.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: AI assistance was used to draft and edit the English wording of this article. The design, code examples, and current implementation are documented in the linked repository.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>programming</category>
      <category>opensource</category>
      <category>compiling</category>
    </item>
  </channel>
</rss>
