r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3]

BrianH
4-May-2010
[2582]
Don't worry Ladislav, the Parse project took a few months to sort 
out before there was a need to involve Carl. It should take some 
time to just search through the blog and comments for ideas (minus 
the inappropriate ones of course).
Ladislav
4-May-2010
[2583]
And, maybe surprisingly, I really do not feel an urgent need to solve 
this, being pretty content with the current state of affairs
BrianH
4-May-2010
[2584]
And that few months was with just two main participants, some historical 
suggestions and a few helpful souls. The object debate would affect 
more people.
Ladislav
4-May-2010
[2585]
Regarding Parse: I am quite surprised, that only two people (in esence) 
edited the enhancement proposal in a substantial way, while others 
(surely having their wishes, or opinions) did not "dare" to commit 
more changes to the document...
BrianH
4-May-2010
[2586]
I don't mind the current state of affairs either, as the current 
(post 'self debate) object model (including the PROTECT tickets) 
works great, and is more general than object models with explicit 
support for classes and properties. It would help if you could look 
over the PROTECT tickets though, Ladislav.
Ladislav
4-May-2010
[2587]
OK, I will take a look
BrianH
4-May-2010
[2588]
For the Parse proposals, I was collecting them from here, resolving 
the debates ahead of time. The only person who didn't participate 
in that way was Peta, whose contributions were greatly appreciated.
Maxim
4-May-2010
[2589]
I admit that i participated only a little in the PARSE debate cause 
brian did such a great job at doing all the PR about it, and because 
I was mostly in agreement with all proposals.

I still wish we could use functions as dynamic rules.
BrianH
4-May-2010
[2590]
The PROTECT tickets to look over are #1014, #1015, #1141, #1142, 
#1143 and #1148. Though in theory SECURE 'protect (#1143) was implemented 
already, the actual setting that it is meant to secure (#1141 and 
#1142) has not been implemented, so there's no way to test it.
Ladislav
4-May-2010
[2591]
BTW, although I had the access to the R3 docs, and having edited 
some parts (Random e.g.), now I cannot log in. Even though I posted 
Carl a msg in R3 chat, the situation looks unchanged, so I cannot 
edit the TO-BINARY to finish the #1539
BrianH
4-May-2010
[2592]
I already brought this up to Carl in a private message. He apparently 
forgot that we lost that ability in the website redo.
GiuseppeC
4-May-2010
[2593x3]
Ok Ladislav, I have understood your position. The discussion about 
accessors will take some time then we will submit it to Carl. I am 
sure you has already noticed the TOC page change via Wiki notification.
Sorry: you -> he has already noticed
Good night to everyone. I have to recover from the short sleep night 
of monday.
BrianH
4-May-2010
[2596]
Keep in mind that accessors aren't the onlt thing under discussion. 
I can recall at least a dozen proposals made in the blog, and all 
of the interesting ones will need to be considered.
Maxim
4-May-2010
[2597]
init and destructor accessors too.

might be nice to support print accessors... what do you think?
BrianH
4-May-2010
[2598]
Accessor syntax on its own is too inefficient to implement. It might 
be worth it if combined with Carl's class suggestion though.
Maxim
4-May-2010
[2599]
I woudn't mind if accessors where reserved for classed based OOP. 
 the controler and model are separate so its a logical match.
BrianH
4-May-2010
[2600x3]
As for Maxim's suggestions above: init and destructor methods (use 
the right terms, Maxim), maybe; print accessors, no. REBOL is not 
an OOP language, so we don't need the workarounds that OOP languages 
need.
Not all methods are accessors.
Print accessors are like those asString() methods that many other 
languages' OOP systems have.
Maxim
4-May-2010
[2603]
well, in some places they use the terms accessors when supply your 
own init/destructor pairs.  python for example
BrianH
4-May-2010
[2604]
Python is an excellent example of the kind of term misuse that comes 
from rampant misunderstanding of most CS.
Maxim
4-May-2010
[2605x2]
fdel is a property in python, but init is a method
you don't specify them them the same way.
Rebolek
4-May-2010
[2607]
I'm just curious, why you need accessors in REBOL at all?
Maxim
4-May-2010
[2608]
but I'm just being devil's advocate I agree that most OOP languages 
consider constructor and destructors specific method types.
BrianH
4-May-2010
[2609]
Right. We shouldn't be using the term "accessor" anyways: Too vague. 
All OOP languages support accessors. Most languages with the syntax 
support you are requesting call that support "properties".
Maxim
4-May-2010
[2610]
rebolek, the best use is to allow control of state within the object.
BrianH
4-May-2010
[2611]
Which we can do already, but syntax support allows us to hide the 
overhead.
Rebolek
4-May-2010
[2612]
Ah, ok.
BrianH
4-May-2010
[2613]
For that matter, accessors can be written in functional or procedural 
style, often more efficiently too, as they are in R3's GUI.
Rebolek
4-May-2010
[2614]
So it's that syntax sugar? I like me syntax
BrianH
4-May-2010
[2615]
The SET-FACE and GET-FACE functions are procedural accessors without 
the syntax support.
Rebolek
4-May-2010
[2616]
sorry
Maxim
4-May-2010
[2617]
liquid and by extension glass use function accessors exclusively. 
 but i would like the syntax within the language... it would allow 
one to use many liquids as ordinary objects and make lazy dataflow 
much more palatable for the casual user.
Rebolek
4-May-2010
[2618]
Brian, exactly, that's what I'm using without problem for some time. 
So I don't understand this discussion, that's why I'm asking.
BrianH
4-May-2010
[2619]
So the main thing that the property feature does (from my extensive 
experience using that feature in other languages) is to hide complexity. 
Which is great, until you actually need to know what the heck is 
going on - something that happens almost immediately. At that point, 
hiding the complexity means destroying your ability to understand 
your own code by looking at it, even a simple assignment statement, 
and forcing you into a particular model of operation that may or 
may not be appropriate. So it's great for Delphi, which comes with 
a built-in GUI framework and is supposed to be easy for VB-level 
programmers to use; it's not so good for REBOL, where the GUI is 
swappable and our users are in some cases some of the smartest people 
I've ever met.
Maxim
4-May-2010
[2620]
still, 

my-face/text: "this"

is more transparent and reusable than

set-face  my-face 'text "this"
or
set-face my-face [text "this"]


ironically glass supports both of the above (using its own set of 
accessors)

set-aspect/get-aspect  and specify
BrianH
4-May-2010
[2621]
transparent -> blackbox
Rebolek
4-May-2010
[2622]
my-face/text: "this" supports every REBOL object that has 'text, 
or not?
Maxim
4-May-2010
[2623]
brian, api builders might be smart, but end-users might not (within 
a specific field of programming), and its not their place to have 
to try and resolve much of that.


if your api works, then it shouldn't cause side-effects break... 
using accessors or not.


accessors are for users of APIs which have a lot to manage which 
isn't going to be delt by the user anyways.  

my two cents.
BrianH
4-May-2010
[2624]
The problem is that my-face/text: "this" would no longer be doing 
what you think it is doing.
Steeve
4-May-2010
[2625]
I'll do a simple: 
text: "this"
:)
Rebolek
4-May-2010
[2626]
Brian, If I do something evil as my-face/text: :delete-your-hd ? 
or when?
Maxim
4-May-2010
[2627x2]
brianh exactly... it would actually make sure the draw-block 'my-face 
 to is up-to date and make sure:

my-face/text: :delete-your-hd  

is refused
oops....    'my-face  to   ==   'my-face *refers* to
Rebolek
4-May-2010
[2629]
Hm, so to lower it to my level of understanding, what you want want 
is basically something like this? : ctx: context [a: 1 [integer!] 
b: "blabla" [string! block!]]
BrianH
4-May-2010
[2630]
Darn, Steeve, you just deleted my hard drive and bombed Cambodia!
Maxim
4-May-2010
[2631]
for example, liquid, uses processed fields.   most of my liquids 
will normalize input, and make sure the output conforms to the spec.


the value might even be converted to a default or a generally accepted 
unknown value like an error! or none!