Talk:Dynamic programming language: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Tags: Mobile edit Mobile web edit
 
(41 intermediate revisions by 29 users not shown)
Line 1:
{{Talk header}}
= Current discussion =
{{WikiProject banner shell|class=Start|1=
== What exactly is a dynamic programming language ? ==
{{WikiProject Computer science |importance=Mid}}
{{WikiProject Perl |importance=Mid}}
{{WikiProject Computing |importance=Low |software=y |software-importance=Mid}}
}}
 
==Untitled==
:''[[Talk:Dynamic programming language/Archive 1|Archive 1]]''
 
= Merge? =
 
Based on the lack of sources and confusion regarding the term, it seems like this article would be better to merge into [[interpreted language]] and possibly [[dynamic typing]]. As the article appears right now, it reads like it was written by [[LISP]] users who want an article fitting their vocabulary, rather than something that fits with the other compsci/[[Programming language theory|PLT]] articles. [[User:H3st|h3st]] ([[User talk:H3st|talk]]) 18:52, 24 November 2015 (UTC)
 
:No, the notion of a dynamic programming language is not really related to interpretation, nor really to dynamic typing (although both are common in dynamic languages). OTOH while the article was pretty incomplete before, it's still incomplete, but rather Lisp heavy. [[User:Rwessel|Rwessel]] ([[User talk:Rwessel|talk]]) 20:42, 24 November 2015 (UTC)
 
= What exactly is a dynamic programming language ? =
I believe that everyone agrees that '''dynamic programmig language''' does not have a precise definition. That's including programming language designers/designers wannabe [http://lambda-the-ultimate.org/node/12]. In addition, this term has been greatly misused by journalists and techies (including Gosling) who simply didn't know what they were talking about. If this article provides a precise definition, well, we need to build it first.
 
=== Languages ===
I believe that everybody agrees that
* Compiled C is not dynamic.
Line 14 ⟶ 28:
* Self-modifiable assembly language ?
 
 
=== Criteria ===
== Criteria ==
* Dynamic = interpreted ?
* Dynamic = dynamically-typed ?
Line 26 ⟶ 41:
* Dynamic = new and shiny ?
 
* Is there such a thing as '''a dynamic programming language''' or should we say that one language is '''more dynamic''' than another ? I would vote for the second option.
* Is there such a thing as '''a dynamic programming language''' or should we say that one ''implementation'' of a language is '''dynamic''' ? I would vote for the second option. After all, iirc, there's an interpreted version of C, with a toplevel and the possibility of adding or replacing functions at run-time. Still, it is the same language.
 
Is'''I there suchhave a thingbetter assuggestion:''' A '''a dynamic programming language''' oris should we sayone that onesupports ''implementation''rapid ofdevelopment acycles: languagerapid ismodification '''dynamic'''of ?code Iand would vote for the seconddesigns, optionetc. After all, iircAlso, there'ssuch anlanguages interpretedare versionnot of C, with a toplevel"new and theshiny"; possibilitythey ofhave addingbeen orwith replacingus functionssince atthe run-time. Still,late it1950's is the same language(LISP).
 
=== Interpretation ===
===Characteristics of dynamic programming languages===
Lisp is dynamic. Lisp can be compiled. Is that a good-enough counter-example ? I must admit that I don't know enough about the internals of Lisp compilation. [[User:Yoric|Yoric]] 16:58, 14 June 2006 (UTC)
 
Lisp, Scheme, Dylan and lots of other "dynamic" languages are regularly compiled to assembly, C or other lower level presentation. IMHO the issue is not about compiling or interpreting, both of which are ambigous terms in themselves. [[User:TokenLander|TokenLander]] ([[User talk:TokenLander|talk]]) 17:48, 3 March 2010 (UTC)
 
=== Dynamic typing, type annotations ===
The term '''dynamic programming language''' does not have a precise definition, but it is nevertheless useful to refer to what distinguishes "dynamic" languages such as [[Perl]] and [[Python programming language|Python]] from more traditional languages such as [[C programming language|C]], [[C Plus Plus|C++]], and [[Java programming language|Java]]. Not all languages considered dynamic will have all of the features below, and some non-dynamic languages will share some of them or have some way to achieve the same effect; the reader should assume that there are exceptions nearly all of the generalizations below.
Could anyone give an example of a dynamic programming language which is not dynamically typed, or a dynamically typed programming language which is not dynamic? -- [[User:ciphergoth|ciphergoth]] 20:05, 2005 Apr 5 (UTC)
 
:Maybe. I'm still not sure what exactly this article wants to classify as a dynamic language. [[pike programming language|Pike]] is a statically typed, high level, object oriented, interpreted language. Is it a dynamic language? I can't tell from this article. Its similar to a statically typed python with C-style syntax though. [[User:Generic Player|Generic Player]] 04:09, 6 Apr 2005 (UTC)
Traditional programming languages require that the program be annotated with extra information (such as [[Datatype#Explicit_or_implicit_declaration_and_inference|type declarations]]) that makes the compile-time checking possible. Dynamic languages dispense with these annotations because they use extra information available at runtime instead. In particular, they are [[dynamic typing|dynamically typed]], and use [[garbage collection (computer science)|automatic memory management]].
 
Another example could be Typed Scheme, http://www.ccs.neu.edu/home/samth/typed-scheme/ , statically typed Scheme. Exact position of Scheme on the static-dynamic spectrum could be argued but it is usually lumped in the dynamic camp. [[User:TokenLander|TokenLander]] ([[User talk:TokenLander|talk]]) 18:12, 3 March 2010 (UTC)
 
This article is a complete mess, and badly in need of a rewrite. The language is informal and non-standard, and there are no sources to any of the potentially controversial (or at least non-obvious) assertions made. Plus, at least half of the content (the bit about functions and addresses) is simply incorrect. The way "dynamic" languages are described as using indirection rather than running code at a predefined memory address really is completely unimportant as a distinction -- it is possible to modify the contents of a memory address (or use it to point elsewhere) while code is running to change the behavior, and this can be done even in C. In fact, it is done in C quite often in some types of programming, such as emulators, for example.
 
The single most important distinguishing feature between most "dynamic" languages and "non-dynamic" languages has to do with type systems (and not interactivity, or some other fuzzily defined concept which doesn't hold under careful examination), yet type systems are practically ignored in the article. [[User:70.36.30.117|70.36.30.117]] 06:27, 28 March 2006 (UTC)
=== Dynamic = dynamically typed? ===
 
:simply because the type system is not the point. It may be easier to implement a dynamic language as a dynamically typed language. Still it is not the same. <small>—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/85.177.153.98|85.177.153.98]] ([[User talk:85.177.153.98|talk]]) 13:53, 6 February 2008 (UTC)</small><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
Could anyone give an example of a dynamic programming language which is not dynamically typed, or a dynamically typed programming language which is not dynamic? -- [[User:ciphergoth|ciphergoth]] 20:05, 2005 Apr 5 (UTC)
 
----
:Maybe. I'm still not sure what exactly this article wants to classify as a dynamic language. [[pike programming language|Pike]] is a statically typed, high level, object oriented, interpreted language. Is it a dynamic language? I can't tell from this article. Its similar to a statically typed python with C-style syntax though. [[User:Generic Player|Generic Player]] 04:09, 6 Apr 2005 (UTC)
 
I'm not sure about the dynamic typing part. I mean yes, every dynamic language I can think of is dynamically typed. But I believe that this absence of static or semi-static checks is more related to the fact that the designers of the language were not able to provide static checks, rather than a feature/drawback by itself. [[User:Yoric|Yoric]] 14:25, 14 June 2006 (UTC)
===Rewrite===
 
----
I just started this rewrite, but didn't have time to finish it. I leave the text here in the hope it's useful in a future version -- [[User:ciphergoth|ciphergoth]] 20:05, 2005 Apr 5 (UTC)
 
To the best of my knowledge, no dynamic language needs type annotations -- although some can use them. Although [[OCaml]] is usually considered static by its fans and detractors, it doesn't need type annotations either. What do we conclude of this ? [[User:Yoric|Yoric]] 16:58, 14 June 2006 (UTC)
In [[computer science]], a '''dynamic programming language''' is a kind of [[programming language]] in which many tests to ensure that each computational step is valid are deferred until the operation is actually performed (at [[runtime]]) rather than taking place when the program is first prepared for execution (at [[compile time]]). They allow programs to change their structure as they run: functions may be introduced or removed, new classes of objects may be created, new modules may appear.
 
Ocaml is statically typed, at compile time, and by most purposes very "static" language. I think we can conclude that the lack of visible type annotations doesn't make any difference when deciding how "dynamic" a language is. [[User:TokenLander|TokenLander]] ([[User talk:TokenLander|talk]]) 17:55, 3 March 2010 (UTC)
 
==DiscussionsCharacteristics onof Dynamicdynamic programming languages==
===Advantages===
 
* Dynamic programming languages are generally somewhat easier for newcomers to programming, in large part because they need not understand the system of annotations referred to above in order to write programs
 
The term '''dynamic programming language''' does not have a precise definition, but it is nevertheless useful to refer to what distinguishes "dynamic" languages such as [[Perl]] and [[Python programming language|Python]] from more traditional languages such as [[C (programming language)|C]], [[C Plus Plus|C++]], and [[Java programming language|Java]]. Not all languages considered dynamic will have all of the features below, and some non-dynamic languages will share some of them or have some way to achieve the same effect; the reader should assume that there are exceptions nearly all of the generalizations below.
----
 
Traditional programming languages require that the program be annotated with extra information (such as [[Datatype#Explicit_or_implicit_declaration_and_inference|type declarations]]) that makes the compile-time checking possible. Dynamic languages dispense with these annotations because they use extra information available at runtime instead. In particular, they are [[dynamic typing|dynamically typed]], and use [[garbage collection (computer science)|automatic memory management]].
This article is a complete mess, and badly in need of a rewrite. The language is informal and non-standard, and there are no sources to any of the potentially controversial (or at least non-obvious) assertions made. Plus, at least half of the content (the bit about functions and addresses) is simply incorrect. The way "dynamic" languages are described as using indirection rather than running code at a predefined memory address really is completely unimportant as a distinction -- it is possible to modify the contents of a memory address (or use it to point elsewhere) while code is running to change the behavior, and this can be done even in C. In fact, it is done in C quite often in some types of programming, such as emulators, for example.
 
The single most important distinguishing feature between most "dynamic" languages and "non-dynamic" languages has to do with type systems (and not interactivity, or some other fuzzily defined concept which doesn't hold under careful examination), yet type systems are practically ignored in the article. [[User:70.36.30.117|70.36.30.117]] 06:27, 28 March 2006 (UTC)
 
The fact that people use the term '''dynamic programming language''' in a variety of imprecise ways doesn't mean it has no precise definition. The current definition "execute at runtime many common behaviors that other languages might perform during compilation" is correct. No language is entirely static (performing all behaviors at compile time) or entirely dynamic (performing all behaviors at runtime), most languages group in the center between the two extremes, with a few outliers ranking highly static (C) or highly dynamic (Smalltalk). That said, it is useful to classify languages based on which dynamic features they include, and how many dynamic features they include. A table similar to those on [[Comparison of programming languages]] would be useful on this page, showing at least "dynamic compilation" (eval/closures/continuations/higher-order functions/self-modification/just-in-time), "dynamic dispatch" (symbolic/multiple dispatch/polymorphic inline caching), "dynamic typing" (not to be confused with weak/implicit, since dynamic type systems can also be strong/explicit), "dynamic loading" (library extension/inclusion/linking), "introspection" (access to meta-information about the source/internal details of the runtime environment). [[User:Allisonrandal|Allisonrandal]] ([[User talk:Allisonrandal|talk]]) 21:24, 13 September 2009 (UTC)
----
 
Closures, continuations & HOFs have nothing to do with "dynamic compilation". And why are macros mentioned in the article? In most languages they are purely a compile time feature. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/130.234.5.137|130.234.5.137]] ([[User talk:130.234.5.137|talk]]) 20:27, 25 February 2010 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
I'm not sure about the dynamic typing part. I mean yes, every dynamic language I can think of is dynamically typed. But I believe that this absence of static or semi-static checks is a consequence of other features, rather than a feature/drawback by itself. [[User:Yoric|Yoric]] 14:25, 14 June 2006 (UTC)
 
Closures are a way of creating new functions at runtime - in that sense they are related to dynamic compilation. Macros in Lisp can be seen as a run-time extension to the interpreter / compiler.
----
 
But closures don't create new code at runtime and thus have nothing to do with dynamic compilation. They only bind a function with an environment, something that can be (and often is) done with plain C. And lisp macros are expanded at compile time, as long as the application doesn't use any form of 'eval' at runtime (in most cases it's not needed and some implementations might not even have 'eval') macros are not used after compilation. [[User:TokenLander|TokenLander]] ([[User talk:TokenLander|talk]]) 19:46, 18 March 2011 (UTC)
 
==Advantages==
 
* Dynamic programming languages are generally somewhat easier for newcomers to programming, in large part because they need not understand the system of annotations referred to above in order to write programs
 
* This delay can be dramatically reduced almost to zero in practice however, for instance, the Objective-C programming language used a pre-loaded cache and a small bit of assembler code in order to reduce this overhead to a single operation.
Line 77 ⟶ 102:
[[User:Yoric|Yoric]] 14:25, 14 June 2006 (UTC)
 
==Rewrite==
 
I just started this rewrite, but didn't have time to finish it. I leave the text here in the hope it's useful in a future version -- [[User:ciphergoth|ciphergoth]] 20:05, 2005 Apr 5 (UTC)
= Archives of the discussion (before 2005) =
 
In [[computer science]], a '''dynamic programming language''' is a kind of [[programming language]] in which many tests to ensure that each computational step is valid are deferred until the operation is actually performed (at [[runtime]]) rather than taking place when the program is first prepared for execution (at [[compile time]]). They allow programs to change their structure as they run: functions may be introduced or removed, new classes of objects may be created, new modules may appear.
How can Eiffel be a dynamic language? It's the exact opposite.
 
==Wrong Languages==
-----------------
 
You can't have it both ways: either a language tries to do extensive compile-time checking, or it defers such checks until runtime. Eiffel advertises itself with all the wonderful things it does at compile time. As a result, it can't be a "dynamic language". In fact, Eiffel is the prototypical static language.
Just removed ASP as "dynamic language"... and added VBScript... learn it loosers!!
 
Agreed. Neither are Oberon and Objective Modula-2.
-----------------
 
VB6 has it both ways. The type of a variable can be declared and the compiler checks the method calls at compile time. Or if the type is Object, then the type checking is deferred to runtime when the underlying type is queried to see if it will respond to the method call. [[Special:Contributions/86.10.80.92|86.10.80.92]] ([[User talk:86.10.80.92|talk]]) 21:46, 2 July 2008 (UTC)
The term "dynamic programming language" is not standard in computer science, and much of the article content is technically misleading, wrong, or just plain gibberish. [[User:K.lee|k.lee]] 18:48 26 May 2003 (UTC)
 
----
This seems to fit the definition of [[Gradual_typing]] ''a type system in which variables may be typed either at compile-time (which is static typing) or at run-time (which is dynamic typing).'' [[User:Dwarring|Dwarring]] ([[User talk:Dwarring|talk]]) 23:30, 26 August 2015 (UTC)
OK, it's much improved now, but still has some inaccuracies and doesn't quite separate out the following issues:
 
* metaprogramming and reflective programming (both a language feature and a programming style)
== Scripting ==
* OO dynamic dispatch (a language feature)
 
* particular compilation strategies for indirect calls
When I read about DPLs, my first question is "how is this different from scripting?" The article needs to explore this &mdash; right now the word "scripting" doesn't even appear, even though common DPLs are more commonly called "scripting languages."
* dynamic loading and linking (a platform service)
 
BTW I still don't agree that dynamic programming language is standard terminology, and the article's blurring of lines among the above three issues doesn't help me believe that there's a precise technical definition of this term. For example, the definition that "functions may be introduced or removed, new classes of objects may be created, new modules may appear" is inadequate --- Java can do all these things through dynamic class loading. Even in C, functions and modules can be introduced or removed.
Even if the distinction is purely artificial (I suspect there's differing opinions on that!) it's an obvious thing to talk about.[[User:Isaac Rabinovitch|Isaac R]] ([[User talk:Isaac Rabinovitch|talk]]) 18:14, 26 June 2009 (UTC)
 
== <verbiage-conversion type="DIPLOMATIC">This Article Could Be Better</verbiage-conversion> ==
 
I'll see if I can find the time to take a crack at this article. It's in rough shape.
 
I think that the problem here is that it tries to define [[Dynamic programming language]] as a first order categorization. As other commenters have stated, "Dynamic" is used to refer to a large collection of semantics of a programming language.
 
The term "dynamic programming language" is a rather loose term used to categorize a programming language that tends to have many dynamic features. Sometimes "dynamic programming language" is used as a comparator of two or more languages. For example: "Why are you using C when a more dynamic programming language such as Lisp seems a better choice?"
 
If I can find the time, I'll take a whack at it.
 
[[User:Neil Smithline|Neil Smithline]] ([[User talk:Neil Smithline|talk]]) 20:49, 4 June 2012 (UTC)
 
== Functional Programming/Closures? ==
What is that whole section even doing in this article? While ''some'' dynamic scripting languages adopted closures and higher-order functions like '''map''' much earlier than mainstream static languages like Java, there's nothing fundamentally functional about dynamic languages. The whole article is badly organised and reads as if written by somebody who just copied and pasted random text from web search results. [[User:Itsbruce|Itsbruce]] ([[User talk:Itsbruce|talk]]) <!--Template:Undated--><small class="autosigned">—Preceding [[Wikipedia:Signatures|undated]] comment added 14:53, 15 March 2017 (UTC)</small> <!--Autosigned by SineBot-->
 
== External links modified ==
 
Hello fellow Wikipedians,
If you're talking about only those languages with strong support for metaprogramming, then Lisp and Dylan (languages with quoted data and syntax macros) qualify but Smalltalk, Self, Objective-C, and OCaml do not.
 
I have just modified one external link on [[Dynamic programming language]]. Please take a moment to review [https://en.wikipedia.org/w/index.php?diff=prev&oldid=800717048 my edit]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
If you're talking about languages with an eval function, then OCaml in its current incarnation does not count by any stretch of the imagination. Smalltalk and Self don't count either, because these only have eval in the sense that the environment has traditionally had an embedded compiler. There's nothing in the Smalltalk or Self language definitions that requires eval to exist. Contrast this with Scheme, which requires eval in the R5RS. Languages with no official standards documents only have eval through tradition; it would not be hard, for example, to include
*Added archive https://www.webcitation.org/65Qmg4eQj?url=http://groovy.codehaus.org/ to http://groovy.codehaus.org/
 
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
I could write more on this topic but I don't have time. I think that, ideally, this article should
* state that the term "dynamic programming language" is neither a technical term nor a binary on/off property;
* then, list four or five precise technical features (e.g., quoted data, eval, dynamic loading, dynamic dispatch and other forms of indirect calls) that make a language "more dynamic" in flavor, linking to articles on those topics rather than describing them in the article body.
* then, discuss costs and benefits of a highly dynamic language, environment, and programming style. One of those costs is a requirement that the user generally must accept either (a) worse performance or (b) greater compiler sophistication. One can then point to an article on implementations of high-level languages. Actually I believe [[programming language implementation]] is an article that sorely needs to be written.
 
{{sourcecheck|checked=false|needhelp=}}
Anyway, someday perhaps I'll do all this, and more, in my Copious Spare Time.
 
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 07:15, 15 September 2017 (UTC)
[[User:K.lee|k.lee]] 02:52, 17 Feb 2004 (UTC)