Proposition:
In principle, the facilities of a programming language should not at all be influenced or restricted by the complexity of the compiler.
Which would imply that all feedback and complaints from compiler creators should be ignored! This is of course absurd and a humorous approach meant as just to illustrate the principle :o)
Please Note: "to compile" here means the overall complete process from source to executable that includes linking and everything in between, but mostly it's at "the front" of this process.
Some examples in Swift:
The introduction of a subtype of String, Substring, which has the same properties as String itself.
If one looks at the documentation the existence of the type Substring is justified with "Operating on substrings is fast and efficient because a substring shares its storage with the original string."
This in fact implies that the only reason for the existence of the type Substring was for machine efficiency and/or to limit compiler complexity.
From an application programmer's point of view the type Substring is completely superfluous and more of a nuisance instead of an improvement.
In case of Substring, the programmer (which can be anyone from a Rookie to a Guru, so to speak) is confronted and needs to know about the intricacies of in whatever way -in this case strings- are implemented on a very low level.
As for me, if I were still a Swift-Rookie programmer, I want to know as little as necessary about these confusing "under the hood" details which are in fact delaying getting my apps up and running. Only in mostly rare cases, that is when an app is running not fast enough, I might be interested. In all other cases I simply really don't want to know, spare me the details, sorry. These kind of low level aspects (e.g. storage, speed) should be completely transparent to the application programmer.
Let's take a look at another example:
The restriction that new operators can only be defined with the use of punctuation characters; currently, in Swift it is not possible to define operators such as
"not" "and" e.g. like so "if not isEating and isAtHome {..} "
Apart from whether or not such operators are useful, this is also a compiler restriction as described in "Commonly Rejected Changes" I quote:
"Requiring the compiler to see the operator declaration to know how to parse a file would break the ability to be able to parse a Swift file without parsing all of its imports. This has a major negative effect on tooling support."
This clearly illustrates that this restriction is induced by compiler specific low level aspects which have no relation with the programming language itself at all.
Note that we're not discussing here the content of these two above examples (of course there are many more) but solely:
How much should compiler (builder's) restrictions "ah, it's too hard or too costly to implement" hinder or even have negative backward impact on the development of a programming language? As for me the most extreme example is the introduction of Substring...
I realize of course:
This whole view is almost purely theoretical, which can of course not be 100% conformed
In a sense, each programming language is more or less a Compromise To The Machine.
Would be nice to know what you think about this.
Thanks
TedvG