Prototype-based Programming - Criticism

Criticism

Advocates of class-based object models who criticize prototype-based systems often have concerns that could be seen as similar to those concerns that proponents of static type systems for programming languages have of dynamic type systems (see datatype). Usually, such concerns involve: correctness, safety, predictability, efficiency and programmer unfamiliarity.

On the first three points, classes are often seen as analogous to types (in most statically typed object-oriented languages they serve that role) and are proposed to provide contractual guarantees to their instances, and to users of their instances, that they will behave in some given fashion.

Regarding efficiency, declaring classes simplifies many compiler optimizations that allow developing efficient method and instance variable lookup. For the Self language, much development time was spent on developing, compiling, and interpreting techniques to improve the performance of prototype-based systems versus class-based systems. For example, the Lisaac compiler produces code almost as fast as C. Tests have been run with an MPEG-2 codec written in Lisaac, copied from a C version. These show the Lisaac version is 1.9% slower than the C version with 37% fewer lines of code.

A common criticism made against prototype-based languages is that the community of software developers is unfamiliar with them, despite the popularity and market permeation of JavaScript. This knowledge level of prototype-based systems seems to be changing with the proliferation of JavaScript frameworks and increases in the complex use of JavaScript as "Web 2.0" matures.

Read more about this topic:  Prototype-based Programming

Famous quotes containing the word criticism:

    It is ... pathetic to observe the complete lack of imagination on the part of certain employers and men and women of the upper-income levels, equally devoid of experience, equally glib with their criticism ... directed against workers, labor leaders, and other villains and personal devils who are the objects of their dart-throwing. Who doesn’t know the wealthy woman who fulminates against the “idle” workers who just won’t get out and hunt jobs?
    Mary Barnett Gilson (1877–?)

    It is from the womb of art that criticism was born.
    Charles Baudelaire (1821–1867)

    People try so hard to believe in leaders now, pitifully hard. But we no sooner get a popular reformer or politician or soldier or writer or philosopher—a Roosevelt, a Tolstoy, a Wood, a Shaw, a Nietzsche, than the cross-currents of criticism wash him away. My Lord, no man can stand prominence these days. It’s the surest path to obscurity. People get sick of hearing the same name over and over.
    F. Scott Fitzgerald (1896–1940)