Closed matifreyre closed 8 years ago
I left the constructors section out of this review because of the discussion at #559.
Mati, I tried to implement your changes but I get into some kind of a mess. Would you like to edit the page yourself? I already gave you the required permissions.
On Tue, Jan 19, 2016 at 6:09 PM, Nicolas Passerini npasserini@gmail.com wrote:
On Mon, Jan 11, 2016 at 4:15 PM, Matías Freyre notifications@github.com wrote:
- A Wollok program is an executable piece of code that consists of a set of statements (actually expressions) that will be executed one after the other This can be thought as a "main" entry point to a program in other languages This program just prints "Hello World!" to the console Further sections will explain all parts of the "consoleprintln()" expression For now, you can think of it as if it was an out-of-the-box function available to programs Or as another instruction 1 At References: Variables and Values
I think that not every statement is an expression, am I wrong?
Ok! El ene. 19, 2016 18:28, "Nico Passerini" notifications@github.com escribió:
Mati, I tried to implement your changes but I get into some kind of a mess. Would you like to edit the page yourself? I already gave you the required permissions.
On Tue, Jan 19, 2016 at 6:09 PM, Nicolas Passerini npasserini@gmail.com wrote:
On Mon, Jan 11, 2016 at 4:15 PM, Matías Freyre <notifications@github.com
wrote:
- A Wollok program is an executable piece of code that consists of a set of statements (actually expressions) that will be executed one after the other This can be thought as a "main" entry point to a program in other languages This program just prints "Hello World!" to the console Further sections will explain all parts of the "consoleprintln()" expression For now, you can think of it as if it was an out-of-the-box function available to programs Or as another instruction 1 At References: Variables and Values
I think that not every statement is an expression, am I wrong?
— Reply to this email directly or view it on GitHub https://github.com/uqbar-project/wollok/issues/584#issuecomment-172992495 .
My comments to the proposals:
On Mon, Jan 11, 2016 at 4:15 PM, Matías Freyre notifications@github.com wrote:
A list of changes I'd do in the language reference page https://githubcom/uqbar-project/wollok/wiki/LanguageReference So far, this is complete up to "Advanced Features" (not included) I'll probably add some more later on
1 At Wollok Program (<-- remove "s")
I would keep the 's' (see other titles, like "Wollok files"
- * A Value is a reference that points to an object and* cannot be redirected (changed) to point to another object It's kind of a "constant"
I would loose the: It's kind of a "constant", as it is not very clear. Maybe we could replace it for something like: (It is not exactly a constant as the referenced object can change itself. The reference is constant but the referenced object might not be.)
- Numbers are immutable objects They understand several messages that can return other numbers**
What do you think about "Can return references to other numbers"
- At Closures
I don't like the word Closure. For example, here is named "code block" / "anonymous function": https://en.wikipedia.org/wiki/Smalltalk#Code_blocks
Against my opinion (but still better than closure): BlockClosure: https://www.gnu.org/software/smalltalk/manual-base/html_node/BlockClosure.html
To my interpretation the term closure could also be applied to anonymous objects. So I would prefer code block or even block closure.
- Instance variables are visible from the subclass Think of them like if they were "protected" in java
Is this true?
- Notice that you don't need to specify the method name In Wollok, you can only invoke the overrided method using super
It should be "overridden"
- Wollok combines objects and classes in a single language, and therefore in programs Polymorphism with classes work in the same way as with objects Two objects of different classes are polymorphic if they understand the same messages sent from a third object
I think we should avoid talking about classes here, because not every object in wollok has a class. I would reduce this to only say "to objects can be use polymorphically if they understand a common set of messages".
-
- There's no need to have a common base class for objects to be polymorphic**\ 1 At Modularization
- Wollok provides a set of rules and language constructions in order to promote modularization 1 At "Packages"
- A package is logical unit that groups together several classes and/or WKOs
- The package has a name (here "birds", "trainers", etc)\ Every** class defined within it will inherit the package name as a prefix
- While coding within this package, you can refer classes with their shortname (here SwimmingBird) This is valid as long as they are also defined within the same package
- To refer to a class from outside the package you MUST use the FQN
— Reply to this email directly or view it on GitHub https://github.com/uqbar-project/wollok/issues/584.
1 At Wollok Program (<-- remove "s")
I would keep the 's' (see other titles, like "Wollok files"
Sure... I edited and removed that afterwards from my original comment.
- * A Value is a reference that points to an object and* cannot be redirected (changed) to point to another object It's kind of a "constant"
I would loose the: It's kind of a "constant", as it is not very clear. Maybe we could replace it for something like: (It is not exactly a constant as the referenced object can change itself. The reference is constant but the referenced object might not be.)
I changed it for: It's kind of a "constant reference", always pointing to the same object, but it's not a "constant" as meant in some other languages due to the fact that the referenced object might change its own state.
I don't like the word Closure.
I think we should open a new issue for this discussion, but so far I will say I like block closure.
- Wollok combines objects and classes in a single language, and therefore in programs Polymorphism with classes work in the same way as with objects Two objects of different classes are polymorphic if they understand the same messages sent from a third object.
I think we should avoid talking about classes here, because not every object in wollok has a class. I would reduce this to only say "to objects can be use polymorphically if they understand a common set of messages".
I wouldn't completely get rid of the term "class". I'd like to explicitly mention that it doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
I changed it for: It's kind of a "constant reference", always pointing to the same object, but it's not a "constant" as meant in some other languages due to the fact that the referenced object might change its own state.
I don't like the word Closure.
I think we should open a new issue for this discussion, but so far I will say I like block closure.
Agreed on both.
- Wollok combines objects and classes in a single language, and therefore in programs Polymorphism with classes work in the same way as with objects Two objects of different classes are polymorphic if they understand the same messages sent from a third object.
I think we should avoid talking about classes here, because not every object in wollok has a class. I would reduce this to only say "to objects can be use polymorphically if they understand a common set of messages".
I wouldn't completely get rid of the term "class". I'd like to explicitly mention that it doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
Ok, and how would it be then?
Updates are already on the page. I wrote it like this:
Wollok combines objects and classes in a single language, and therefore in programs. Polymorphism with classes work in the same way as with objects. It doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
Two objects can be used polymorphically if they understand a common set of messages.
On Wed, Jan 20, 2016 at 3:07 PM, Nico Passerini notifications@github.com wrote:
I changed it for: It's kind of a "constant reference", always pointing to the same object, but it's not a "constant" as meant in some other languages due to the fact that the referenced object might change its own state.
I don't like the word Closure.
I think we should open a new issue for this discussion, but so far I will say I like block closure.
Agreed on both.
- Wollok combines objects and classes in a single language, and therefore in programs Polymorphism with classes work in the same way as with objects Two objects of different classes are polymorphic if they understand the same messages sent from a third object.
I think we should avoid talking about classes here, because not every object in wollok has a class. I would reduce this to only say "to objects can be use polymorphically if they understand a common set of messages".
I wouldn't completely get rid of the term "class". I'd like to explicitly mention that it doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
Ok, and how would it be then?
— Reply to this email directly or view it on GitHub https://github.com/uqbar-project/wollok/issues/584#issuecomment-173308954 .
Great!
On Wed, Jan 20, 2016 at 3:16 PM, Matías Freyre notifications@github.com wrote:
Updates are already on the page. I wrote it like this:
Wollok combines objects and classes in a single language, and therefore in programs. Polymorphism with classes work in the same way as with objects. It doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
Two objects can be used polymorphically if they understand a common set of messages.
On Wed, Jan 20, 2016 at 3:07 PM, Nico Passerini notifications@github.com wrote:
I changed it for: It's kind of a "constant reference", always pointing to the same object, but it's not a "constant" as meant in some other languages due to the fact that the referenced object might change its own state.
I don't like the word Closure.
I think we should open a new issue for this discussion, but so far I will say I like block closure.
Agreed on both.
- Wollok combines objects and classes in a single language, and therefore in programs Polymorphism with classes work in the same way as with objects Two objects of different classes are polymorphic if they understand the same messages sent from a third object.
I think we should avoid talking about classes here, because not every object in wollok has a class. I would reduce this to only say "to objects can be use polymorphically if they understand a common set of messages".
I wouldn't completely get rid of the term "class". I'd like to explicitly mention that it doesn't matter if the object is an instance of a class or a WKO or an anonymous one, they can potentially be used polymorphically.
Ok, and how would it be then?
— Reply to this email directly or view it on GitHub < https://github.com/uqbar-project/wollok/issues/584#issuecomment-173308954> .
— Reply to this email directly or view it on GitHub https://github.com/uqbar-project/wollok/issues/584#issuecomment-173312754 .
All the proposed changes have been added a month ago. I'm closing the issue. Open a new one if needed.
A list of changes I'd do in the language reference page. So far, this is complete up to "Advanced Features" (not included). I'll probably add some more later on.