[WebDNA] Was: wiki Now: Object-oriented programmng

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103967
interpreted = N
texte = Patrick McCormick wrote: > An object-oriented language has a syntax consisting of objects, rather > than predominately procedural steps. Just because you can use those > procedural steps to make a piece of code that behaves like an object > doesn't cut it. > > Frankly, I'm not very heartbroken that WebDNA isn't OOP. I don't think > it would add much benefit. > > I think that WebDNA is perfect for web servers because the process of > creating and sending pages is pretty darn procedural. Although OOP stuff > like Flash and JavaScript can exist in a page and do things after the > page gets there, page assembly and delivery - especially when data is > being retrieved in rows and columns, seems more intuitive in a > procedural environment. Christer wrote: > The very foundation for OOP is the use of objects (instances of > classes which can have properties and methods, all encapsulated within > the class) and inheritance (subclasses of objects that can share all > or just some of their super's properties and methods). > Best, > Christer Christer wrote: > WebDNA is a great language but it's not object-oriented in any way. > Best, > Christer O.K., up at 5:30 AM so I can respond. :-) First, Ultimately I agree that, especially programmers of other languages, WebDNA will not be viewed as an OOP language by the larger public. I will delete that aspect from the wiki for that reason. I think Christer defines OOP in a way that most others will view it. However, I don't agree with Christers last comment that it is no way OOP. Here is some insight why I think this... As noted by Patrick, most WebDNA'ers create procedural code or even Non-structured code. http://en.wikipedia.org/wiki/Unstructured_programming However, this does not have to be the case. Non-structured programming, structured(procedural) programming, and OOP, are, for the most part, *styles* of programming and I argue that WebDNA has evolved to a point where it is (nearly) possible to code WebDNA in an OOP style. Referencing the wikipedia page "Object-oriented programing" (Main features), I've included a snippet that includes the usual characteristics of OOP. I'll make my arguments within! ;-) ---- Main features The attempt to distill OOP to a minimal set of features is considered futile by programming language researcher Benjamin Cuire Pierce. Nevertheless, he identifies the following as fundamental features that are found in most object-oriented languages and that, in concert, support the OOP programming style:[4] * Dynamic dispatch -- when a method is invoked on an object, the object itself determines what code gets executed by looking up the method at run time in a table associated with the object. This feature distinguishes an object from an abstract data type (or module), which has a fixed (static) implementation of the operations for all instances. It is a programming methodology that gives modular component development while at the same time being very efficient. [The WebDNA Argument: Though webdna does not have objects/classes in the traditions sense, I argue that the premise of an object can be hacked with WebDNA... An example of dynamic dispatch in WebDNA may be an include file that contains functions (methods), for example.. one of which decides what other functions (methods) to call. http://en.wikipedia.org/wiki/Dynamic_dispatch "In a small number of languages such as Common Lisp, methods or functions can also be dynamically dispatched based on the type of arguments. Expressed in pseudocode, the code manager.handle(y) could call different implementations depending on the type of object y. This is known as multiple dispatch."] * Encapsulation (or multi-methods, in which case the state is kept separate) [WebDNA Argument: This has to with limiting things, such as limiting the hackability of an app or object, by keeping non needed code "hidden". I attest these types of things can be accomplished with WebDNA using the scoping of variables that is also implied with WebDNA's [function] context. http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)] * Subtype polymorphism [WebDNA Argument: Since WebDNA doesn't deal with classes and superclasses, it would be an interesting challenge to convince someone from a C++ background that WebDNA has this capability :-).. but why not try.. http://en.wikipedia.org/wiki/Subtype_polymorphism "n programming language theory, subtyping or subtype polymorphism is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability" Though the inheritance idea would not work in the same way as some other languages, I suppose a hack could be made in webdna to create a "S <: T" relationship. * object inheritance (or delegation) [WebDNA Argument: Since inheritance is usually defined more by the use of objects and classes in the traditional sense, maybe the *delegation* definition works better for WebDNA: http://en.wikipedia.org/wiki/Delegation_(programming) "Delegation is the simple yet powerful concept of handing a task over to another part of the program. In object-oriented programming it is used to describe the situation wherein one object defers a task to another object, known as the delegate."] * Open recursion -- a special variable (syntactically it may be a keyword), usually called this or self, that allows a method body to invoke another method body of the same object. This variable is late-bound; it allows a method defined in one class to invoke another method that is defined later, in some subclass thereof. [WebDNA Argument: WebDNA doesn't have a keyword for this and functions work a bit differently in WebDNA than in most OOP languages, but the basic principle is doable in WebDNA.] ---- Anyway, after looking into this, I wouldn't dare waste my time trying to defend WebDNA as an OOP language.. life is too short. ;-), so I will take that out of the Wiki.. but one point about all this is that I think the latest changes (derived from SMSI) help in making this language compete with the best of them in some of the latest coding techniques. As Patrick alluded... Who needs objects and classes on the web when you have [include] and [function] anyway. ;-) Happy friday! Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
  2. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (William DeVaul 2009)
  3. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
  4. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Brian Fries 2009)
  5. Re: [WebDNA] Was: wiki Now: Object-oriented programmng (Matthew Bohne 2009)
  6. [WebDNA] Was: wiki Now: Object-oriented programmng (Donovan Brooke 2009)
Patrick McCormick wrote: > An object-oriented language has a syntax consisting of objects, rather > than predominately procedural steps. Just because you can use those > procedural steps to make a piece of code that behaves like an object > doesn't cut it. > > Frankly, I'm not very heartbroken that WebDNA isn't OOP. I don't think > it would add much benefit. > > I think that WebDNA is perfect for web servers because the process of > creating and sending pages is pretty darn procedural. Although OOP stuff > like Flash and JavaScript can exist in a page and do things after the > page gets there, page assembly and delivery - especially when data is > being retrieved in rows and columns, seems more intuitive in a > procedural environment. Christer wrote: > The very foundation for OOP is the use of objects (instances of > classes which can have properties and methods, all encapsulated within > the class) and inheritance (subclasses of objects that can share all > or just some of their super's properties and methods). > Best, > Christer Christer wrote: > WebDNA is a great language but it's not object-oriented in any way. > Best, > Christer O.K., up at 5:30 AM so I can respond. :-) First, Ultimately I agree that, especially programmers of other languages, WebDNA will not be viewed as an OOP language by the larger public. I will delete that aspect from the wiki for that reason. I think Christer defines OOP in a way that most others will view it. However, I don't agree with Christers last comment that it is no way OOP. Here is some insight why I think this... As noted by Patrick, most WebDNA'ers create procedural code or even Non-structured code. http://en.wikipedia.org/wiki/Unstructured_programming However, this does not have to be the case. Non-structured programming, structured(procedural) programming, and OOP, are, for the most part, *styles* of programming and I argue that WebDNA has evolved to a point where it is (nearly) possible to code WebDNA in an OOP style. Referencing the wikipedia page "Object-oriented programing" (Main features), I've included a snippet that includes the usual characteristics of OOP. I'll make my arguments within! ;-) ---- Main features The attempt to distill OOP to a minimal set of features is considered futile by programming language researcher Benjamin Cuire Pierce. Nevertheless, he identifies the following as fundamental features that are found in most object-oriented languages and that, in concert, support the OOP programming style:[4] * Dynamic dispatch -- when a method is invoked on an object, the object itself determines what code gets executed by looking up the method at run time in a table associated with the object. This feature distinguishes an object from an abstract data type (or module), which has a fixed (static) implementation of the operations for all instances. It is a programming methodology that gives modular component development while at the same time being very efficient. [The WebDNA Argument: Though webdna does not have objects/classes in the traditions sense, I argue that the premise of an object can be hacked with WebDNA... An example of dynamic dispatch in WebDNA may be an include file that contains functions (methods), for example.. one of which decides what other functions (methods) to call. http://en.wikipedia.org/wiki/Dynamic_dispatch "In a small number of languages such as Common Lisp, methods or functions can also be dynamically dispatched based on the type of arguments. Expressed in pseudocode, the code manager.handle(y) could call different implementations depending on the type of object y. This is known as multiple dispatch."] * Encapsulation (or multi-methods, in which case the state is kept separate) [WebDNA Argument: This has to with limiting things, such as limiting the hackability of an app or object, by keeping non needed code "hidden". I attest these types of things can be accomplished with WebDNA using the scoping of variables that is also implied with WebDNA's [function] context. http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)] * Subtype polymorphism [WebDNA Argument: Since WebDNA doesn't deal with classes and superclasses, it would be an interesting challenge to convince someone from a C++ background that WebDNA has this capability :-).. but why not try.. http://en.wikipedia.org/wiki/Subtype_polymorphism "n programming language theory, subtyping or subtype polymorphism is a form of type polymorphism in which a subtype is a datatype that is related to another datatype (the supertype) by some notion of substitutability" Though the inheritance idea would not work in the same way as some other languages, I suppose a hack could be made in webdna to create a "S <: T" relationship. * object inheritance (or delegation) [WebDNA Argument: Since inheritance is usually defined more by the use of objects and classes in the traditional sense, maybe the *delegation* definition works better for WebDNA: http://en.wikipedia.org/wiki/Delegation_(programming) "Delegation is the simple yet powerful concept of handing a task over to another part of the program. In object-oriented programming it is used to describe the situation wherein one object defers a task to another object, known as the delegate."] * Open recursion -- a special variable (syntactically it may be a keyword), usually called this or self, that allows a method body to invoke another method body of the same object. This variable is late-bound; it allows a method defined in one class to invoke another method that is defined later, in some subclass thereof. [WebDNA Argument: WebDNA doesn't have a keyword for this and functions work a bit differently in WebDNA than in most OOP languages, but the basic principle is doable in WebDNA.] ---- Anyway, after looking into this, I wouldn't dare waste my time trying to defend WebDNA as an OOP language.. life is too short. ;-), so I will take that out of the Wiki.. but one point about all this is that I think the latest changes (derived from SMSI) help in making this language compete with the best of them in some of the latest coding techniques. As Patrick alluded... Who needs objects and classes on the web when you have [include] and [function] anyway. ;-) Happy friday! Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Redirect (2003) Referrer problem - Truncation (1998) MySQL (2003) Really need a answer (1999) plugin-acgi, different results (1997) Multiple Passwords (1997) [OT] Applescript (2003) calculating unique time (1998) Interpret Around Contexts? (2000) Almost a there but..bye bye NetCloak (1997) WebCat2 beta 11 - new prefs ... (1997) Ampersand (1997) [WebDNA] Checking a radio button (2008) WC2.0 Memory Requirements (1997) [ShowIf] if the varieable exists (1998) [WebDNA] How to get the domain name? (2009) WebCat2 - Getting to the browser's username/password data (1997) Converting characters to numbers ... (1997) Using Plug-In while running 1.6.1 (1997) More than one db with the same namn (was: WC2f3) (1997)