(For a lot more detail, check Mozilla's draft type inference paper (PDF).) Mozilla's hybrid type inference technology works by combining an analysis of JavaScript before it runs with further information gathered as the program runs. And one of Dart's high-profile features is that it supported static typing.ĭynamic typing is slower because a browser element called the just-in-time (JIT) compiler-which converts a programmer's JavaScript into the instructions a computer understands-must account for all the possible types a variable could be, said Brian Hackett, the lead type inference programmer, in a blog post. Traditional heavy-duty languages such as C or Java, though, use statically typed variables whose nature must be declared in advance by the programmer.ĭynamic typing adds flexibility, but it slows down program execution. JavaScript is dynamically typed, which means that a variable can hold any sort of information. Type inference gets to the heart of a fundamental divide between programming languages: the nature of variables that store information such as numbers or text. Such factors mean a virtuous cycle of steady improvement that makes it harder for a more revolutionary approach to gain a foothold. Programmers are familiar with it, newer browsers are remarkably faster at running it, and many libraries of pre-written software such as jQuery make powerful features easily accessible to Web developers. JavaScript has the classic benefits of an incumbent technology. In addition, Microsoft remains influential with programmers, and it just offered a very public vote of no confidence. Microsoft's stance makes it look like it'll be very hard to build that support into Internet Explorer. And allies are key: For Dart to live up to its potential, it needs support among browser makers. Five members of Microsoft's JavaScript team said the Dart sales pitch argues "JavaScript has fundamental flaws, and to support these scenarios requires a 'clean break' from JavaScript.We disagree with this point of view."ĭart got off to a rough start, with Google alienating some potential allies with an insular early-stage development process.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |