It's clear that web needs a new, better language. Some of the problems with JavaScript are:
- It doesn't have an include clause (C++: #include, Pascal: uses, C#: using) so you can logically connect libraries without using HTML
- It doesn't have an integer type or other necessary types. Some environments infer the type and optimize its usage, but without stronger control it's too easy for a programmer to make a typo that will pass unnoticed and generate unoptimized code or errors
- Certain behaviors make the code slow, but the programmer usually doesn't have a clue because everything was designed to "protect" the programmer from the background code, often resulting in unoptimized slow code
Google managed to speed up JavaScript in their extreme V8 engine beyond what anyone thought possible. But it still wasn't enough. So Google started the development of Dart, a new soft-typed web language that would replace JavaScript.
Microsoft also started to work on a new language called TypeScript. This language is very similar to JavaScript, but adds classes and soft-types.
Both of those languages have good and bad parts. The good parts have to be kept and combined together. The bad parts have to be removed while there's still time.
Good about Dart
- Classes, which make code clearer, easier for maintenance and easier to optimize
- Integer types, that are essential for high-performance programming
- Properties, with seamlessly implemented direct access to variables or getters and setters
Bad about Dart
- Its syntax has certain outdated aspects copied from C++. Some of the developers of Dart use C++ for so long that they can't see how ugly and outdated it is. So they decided to copy some of that "nice" syntax to Dart. (This is plain wrong and makes the language look and behave in an archaic way. It makes it just slightly easier for C++ programmers to switch to Dart, but they are already used to hard syntax so for them this is a step forward anyway. On the other hand, it makes JS programmers desperate because they have to switch from a modern to outdated ugly syntax. It's always much harder to make a step backwards, especially when things can be made so that everyone is satisfied.)
- switching from complicated to simple is easy anyway. At the same time, it makes the life JS programmers much harder, because they actualy have to switch from nice to ugly and illogical.
- Which means JS programmers will have a harder time switching to an uglier and less logical syntax (step back) while C++ programmers will have a slightly easier time. But step back
- This syntax doesn't mean much to C++
- It also make it much harder for JS programmers to switch to Dart (because it's much easier to go from good to bad syntax, then it is for C++ programmers to switch to easier and nice er synatx=, while it doesn't
which means JS programmers will have a faster learning curve, while C++ programmers will just have to accept it's new (much improved) syntax.
Unfortunately, this language has a much uglier syntax than JavaScript (a mix between JS and ugly C++). It's not JS but it's not C++ either, so both programming groups will have to waste time learning its syntax.
. Googl
The cooperation of programmer is essential. Here are a few things that need to be added to make
to incredible as much as possible using their excellent V8 engine. But even that isn't enough, because JS is a too dynamic language. Now, how can something be "too dynamic"?
Well, most of JS programmers are young people who like to produce ad-hoc code, without thinking before coding. I call it Atilla the Hun style. In a strongly typed and well structured language this isn't
started working on Dart, which should exec
Fortunately, the development of Google V8 engine and Microsoft's TypeScript
Some of the problems with current implementation of JavaScript are:
Nema komentara:
Objavi komentar