| > Flat is better than nested
That's fine for namespaces, but given the choice of aggregation (which implies more nesting) or inheritance (which implies lack of rigor), I'd choose more nesting. > Errors should never pass silently unless explicitly silenced
Yet you implement exceptions in a language, and don't annotate (or infer) exception annotations on functions. > There should be one—and preferably only one—obvious way to do it
Should you write `a + x` or `x + a`? 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? > /* block comments /
Should it support nested comments? > string example = "hello world";
I see that you're trying to pursue similarity to C++ or Java, but I don't see why. Which other type can "hello world" 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. > int x = 1;
> float x = 3.21;
> decimal y = 3.1416;
It was 2018, and we still thought that we have constant, immutable word size on all platforms, and it won't change the next year. Come on, even C++ came up with int32 and int64 types. > RegEx email = /[a-z0-9_-.]+@.+\.[a-z]+/ig;
Please tell me that you've read on TCL'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. > out.println(i);
Sure, more implicit type conversions! > int[...] list = [1, 2, 3, ...];
Magical syntax for array is what everyone is waiting in 2018. Why keep it simple? > int[] anotherArray = new int[15];
> int[] newArray = array[2..4];
In both cases we create some space on heap, and initialize it in some way. It's something like several constructors of the same data type. Why do they have different syntax? > 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't forget support for COM! > const int pi = 3.1416;
Literally THE line of code that defines each and every programming language developer that didn't care to learn some PLT. > x = 3 * 5;
Fortran is dead! Use `3 ^ 5` or `3 pow 5`. It's in no way clear why double multiplication is exponentiation. BTW, is it right-associative? > Eventually, I plan on supporting unicode characters like “≥” and deprecating their digraph alternatives like “>=”.
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're essentially putting programmers into a flaming pit. > x = isOdd and isEven;
> x = isOdd or isEven;
Now this is actually something good. > class HTTPError extends Error {}
That's not how a good pascal case works. It should have been HttpError. > 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's somehow better than destructors
Also Java didn'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? > 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? > 1. Write language spec
Consider this as "cease and desist" for writing programming languages until you get formal education in doing so. We don'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. |
Only people who have trained at the feet of experts are allowed to try their hand at designing a language?
Maybe they learn something, maybe they fail but either way it doesn't hurt anything to try.