Show HN: Nirvana, a WIP programming language
&gt; Flat is better than nested
That&#x27;s fine for namespaces, but given the choice of aggregation (which implies more nesting) or inheritance (which implies lack of rigor), I&#x27;d choose more nesting.<p>&gt; Errors should never pass silently unless explicitly silenced
Yet you implement exceptions in a language, and don&#x27;t annotate (or infer) exception annotations on functions.<p>&gt; There should be one—and preferably only one—obvious way to do it
Should you write `a + x` or `x + a`?<p>This smart-sounding babble was made by a person that has no education in programming language theory. Are you sure you want to put it as a basis for your language?<p>&gt; &#x2F;* block comments <i>&#x2F;
Should it support nested comments?<p>&gt; string example = &quot;hello world&quot;;
I see that you&#x27;re trying to pursue similarity to C++ or Java, but I don&#x27;t see why. Which other type can &quot;hello world&quot; have in your language? It takes no effort to get computed type of RHS and set it as a type of variable. Also you should be aware that putting type in that position makes it hard to keep your grammar without ambiguity, especially in long-term.<p>&gt; int x = 1;
&gt; float x = 3.21;
&gt; decimal y = 3.1416;
It was 2018, and we still thought that we have constant, immutable word size on all platforms, and it won&#x27;t change the next year. Come on, even C++ came up with int32 and int64 types.<p>&gt; RegEx email = &#x2F;[a-z0-9_-.]+@.+\.[a-z]+&#x2F;ig;
Please tell me that you&#x27;ve read on TCL&#x27;s regexps, and how they managed to avoid exponential parsing times in most cases. Regexps inside of a programming language implementation ARE pain. You essentially enforce your implementation, so it has to be perfect, unicode support and performance-wise.<p>&gt; out.println(i);
Sure, more implicit type conversions!<p>&gt; int[...] list = [1, 2, 3, ...];
Magical syntax for array is what everyone is waiting in 2018. Why keep it simple?<p>&gt; int[] anotherArray = new int[15];
&gt; int[] newArray = array[2..4];
In both cases we create some space on heap, and initialize it in some way. It&#x27;s something like several constructors of the same data type. Why do they have different syntax?<p>&gt; A kitten dies somewhere each time you use this type without a very good reason.
Another Visual Basic programmer is born every time you add unbounded Variant type into your language. Don&#x27;t forget support for COM!<p>&gt; const int pi = 3.1416;
Literally THE line of code that defines each and every programming language developer that didn&#x27;t care to learn some PLT.<p>&gt; x = 3 </i>* 5;
Fortran is dead! Use `3 ^ 5` or `3 pow 5`. It&#x27;s in no way clear why double multiplication is exponentiation. BTW, is it right-associative?<p>&gt; Eventually, I plan on supporting unicode characters like “≥” and deprecating their digraph alternatives like “&gt;=”.
Try writing a row or two of Agda without emacs, and you will drop that idea. The problem is that unicode characters are absent from your keyboard, and there is no standardized way to write them. So you&#x27;re essentially putting programmers into a flaming pit.<p>&gt; x = isOdd and isEven;
&gt; x = isOdd or isEven;
Now this is actually something good.<p>&gt; class HTTPError extends Error {}
That&#x27;s not how a good pascal case works. It should have been HttpError.<p>&gt; finally {
So every time I have an object that needs destruction
- I have to write `finally` directive
- I have not to forget to do so
- It&#x27;s somehow better than destructors
Also Java didn&#x27;t manage to properly implement `finally` on JVM, so if you have `finally` blocks inside of `finally` blocks, you get exponential growth of class-file size. Are you sure you will be able to handle it properly?<p>&gt; int restParams (int ...values) {}
What about parameters having different types? What is even the purpose of rest-params that have the same type? Avoid two extra square brackets in a function call?<p>&gt; 1. Write language spec
Consider this as &quot;cease and desist&quot; for writing programming languages until you get formal education in doing so. We don&#x27;t need another Python 2, another Python 3, another Ruby or another Go. Economic impact of bad languages is way too big. Please, accept this harsh language, feel the offence and just stop.