DreamBerd is a perfect programming language
DreamBerd&#x27;s features in real-world languages I&#x27;ve heard of or used, I may have missed some in Perl, Ruby, PHP, and others:<p>- Exclamation marks: behave like semicolons in most language (extras are allowed). In some languages like Ruby and Lisps, convention is to put exclamation marks at the end of mutating functions, and question marks at the end of predicates<p>- Declarations: C++ has constant variables and pointers, like `const int * const x`. JavaScript has `const` which lets you mutate the variable, and TypeScript has separate `const` and `readonly`.<p>- Naming: Lisps let you put punctuation in names, and see <a href="https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;questions&#x2F;28786&#x2F;write-a-program-that-makes-2-2-5" rel="nofollow">https:&#x2F;&#x2F;codegolf.stackexchange.com&#x2F;questions&#x2F;28786&#x2F;write-a-p...</a><p>- Arrays: Lua and R have 1-based indexing and R coerces float indices to integers, though JavaScript&#x27;s interpretation is arguably even worse (<a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;6649444" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;6649444</a>)<p>- When: Unless you count setters and reflection magic, (un)fortunately the only example is the joke language INTERCAL<p>- Lifetime: These aren&#x27;t anything like Rust&#x27;s lifetimes<p>- Installer: Some languages used to have bad installations but I believe this is mostly fixed now. But difficult project configuration is still a thing (nodejs bundlers, CMake, Gradle), as-is create-foo-app<p>- Loops: Loops don&#x27;t technically exist in pure functional languages like Haskell (though `forM_` is basically a loop), and other functional languages like ML and Scheme usually discourage loops. Instead there is recursion<p>- Boolean: Applies to any language with implicit `null` and `undefined`. I&#x27;m sure JavaScript and even TypeScript devs have encountered actual bugs caused by a bool which was neither `true` nor `false`. Even languages with explicit null you&#x27;ll occasionally see `Option&lt;bool&gt;`<p>- Arithmetic: I&#x27;ve never seen this feature, which is actually kind of sad because I actually kind of like it (not enough to give `+` priority over `*` though).<p>- Indents: No languages, but I&#x27;ve had my IDE suggest 3 idents when it got screwed up (e.g. newline and there is a space after my cursor)<p>- Equality: Taken from JavaScript. Some languages like C++ and Java also have `==` which you don&#x27;t always want<p>- Function: I know there are languages which let you declare keywords with shorthand but I can&#x27;t remember which ones, only certain command completions (e.g. `npm i` for `npm install`). I do know there are languages which let you omit syntax like HTML closing tags (which comes later) and languages which have the same syntax with extra keywords for legacy reasons (SQL)<p>- Dividing by Zero: Is literally undefined behavior for integers in some languages like C, and literally undefined in actual math. Otherwise, in every language I&#x27;m familiar with it either returns NaN or infinity (for floats) or throws an exception<p>- Strings: Lua and JavaScript let you use single and double quotes, Python lets you use triple quotes, many languages have quasi-quotes for interpolated strings, and some languages let you use arbitrary delimiters like Racket (<a href="https:&#x2F;&#x2F;beautifulracket.com&#x2F;explainer&#x2F;stringlike-types.html#here-strings-and--expressions" rel="nofollow">https:&#x2F;&#x2F;beautifulracket.com&#x2F;explainer&#x2F;stringlike-types.html#...</a>)<p>- String interpolation: Most languages use ${}, Swift uses \(), some use just {} or #{}<p>- Types: C, Haskell, Java, and JavaScript treat strings as an array of characters (even though UTF-8 strings technically aren&#x27;t), and Scheme and Haskell have arbitrary-precision numbers as the default. Python and TypeScript type annotations don&#x27;t always work and aren&#x27;t fully checked, as are Typed Racket&#x27;s but Typed Racket is getting better at this<p>- Regular expressions to narrow string values: Not arbitrary regular expressions, but TypeScript&#x27;s template literal types are close (<a href="https:&#x2F;&#x2F;www.typescriptlang.org&#x2F;docs&#x2F;handbook&#x2F;2&#x2F;template-literal-types.html" rel="nofollow">https:&#x2F;&#x2F;www.typescriptlang.org&#x2F;docs&#x2F;handbook&#x2F;2&#x2F;template-lite...</a>). Different languages and libraries name their regular expression type Regex, RegExp, and Regexp<p>- Previous and next: None. Though after does exist in a way (`defer` in some langauges)<p>- File structure: None, except Java requires one class per file, and most languages enforce that file structure matches package structure although some don&#x27;t (e.g. TypeScript)<p>- Export: None, most languages let you control exports with either `export`, visibility modifiers, or separate header &#x2F; implementation files, though some don&#x27;t let you control exports at all and only &quot;suggest&quot; with underscores (e.g. Python). Rust even lets you set visibility to certain crates, which is a bit like DreamBerd&#x27;s `export`, except only limited to super-crates because you must ensure that your symbol is visible in the create it&#x27;s defined<p>- Class: Almost every language has classes, though some languages like Rust and Haskell have typeclasses which are different than OOP classes. The exceptions like C have &quot;ad-hoc&quot; classes for large projects, and ML has modules which are like classes but explicit (although OCaml has classes too!) Every language lets you create multiple instances of classes, but singletons and the factory pattern are very common in Java and also sometimes C++.<p>- Now: `Date.now()` is literally defined, in most languages, and nearly every language will let you get the current time in some way (even if behind a monad)<p>- Delete: `delete` and its equivalent let you delete quite a lot. In R you can delete local variables and then they will no longer be defined; you can delete keywords because they&#x27;re actually functions which use R&#x27;s weird evaluation rules; and you can access environments of other functions and delete their local variables, causing the function to break with &quot;`x` not found&quot;. See this (<a href="https:&#x2F;&#x2F;stat.ethz.ch&#x2F;R-manual&#x2F;R-devel&#x2F;library&#x2F;base&#x2F;html&#x2F;rm.html" rel="nofollow">https:&#x2F;&#x2F;stat.ethz.ch&#x2F;R-manual&#x2F;R-devel&#x2F;library&#x2F;base&#x2F;html&#x2F;rm.h...</a>), which even has &quot;remove everything in the global scope&quot; as an example<p>- Overloading: Name shadowing is possible in most languages, and Rust lets you shadow variables directly like in the example. Personally I like this though, because 99% of the time when I redefine a variable with the same name, I intend to no longer use the old variable.<p>- CSS also has the `!important` rule which lets you prioritize overloads, and with nested selectors almost resembles DreamBerd&#x27;s `!` prioritization.<p>- Signals: In JavaScript and they are quite confusing, The split function version (`getFoo()` &#x2F; `setFoo(newValue)`) is in React useState and Solid.js, and the `value` setter with implicit getter (`foo.value` or `foo` in JSX, `foo.value = newValue`) is in preact. I believe the single function version (`foo()` &#x2F; `foo(newValue)`) is in some library but I&#x27;m not sure which, I do know `setValue` can take a function with the previous value.<p>- AI: Automatic semicolon insertion is in JavaScript, and automatic closer insertion is in HTML. Most modern languages convert automatic insertion into syntax errors with quick fixes<p>- Copilot: If you write a more esoteric language like Coq, Copilot won&#x27;t really understand your code either. Though it will understand the syntax and common parts, only suggestions will be worse than usual<p>- Ownership: The Rust foundation had a fiasco with their trademark proposal, though they&#x27;ve apologized and hopefully it&#x27;s not going to be an issue in the next proposal<p>- Compiling: Most languages can compile most programs. However C++&#x27;s parsing is literally undecidable (<a href="https:&#x2F;&#x2F;blog.reverberate.org&#x2F;2013&#x2F;08&#x2F;parsing-c-is-literally-undecidable.html" rel="nofollow">https:&#x2F;&#x2F;blog.reverberate.org&#x2F;2013&#x2F;08&#x2F;parsing-c-is-literally-...</a>), as is TypeScript&#x27;s type system (<a href="https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;TypeScript&#x2F;issues&#x2F;14833">https:&#x2F;&#x2F;github.com&#x2F;microsoft&#x2F;TypeScript&#x2F;issues&#x2F;14833</a>).