On 6/9/2012 9:28 PM, Igor Stasenko wrote:
While i agree with guy's bashing on HTTP,
the second part of his talk is complete bullshit.
IMO, he did raise some valid objections regarding JS and similar though
as well.
these are also yet more areas though where BS differs from JS: it uses
different semantics for "==" and "===" (in BS, "==" compares by value
for compatible types, and "===" compares values by identity).
granted, yes, bashing OO isn't really called for, or at least absent
making more specific criticisms.
for example, I am not necessarily a fan of Class/Instance OO or deeply
nested class hierarchies, but I really do like having "objects" to hold
things like fields and methods, but don't necessarily like it to be a
single form with a single point of definition, ...
would this mean I am "for" or "against" OO?...
I had before been accused of being anti-OO because I had asserted that,
rather than making deeply nested class hierarchies, a person could
instead use some interfaces.
the problem is partly that "OO" often means one thing for one person and
something different for someone else.
He mentions a kind of 'signal processing' paradigm,
but we already have it: message passing.
Before i learned smalltalk, i was also thinking that OOP is about
structures and hierarchies, inheritance.. and all this
private/public/etc etc bullshit..
After i learned smalltalk , i know that OOP it is about message
passing. Just it. Period.
And no other implications: the hierarchies and structures is
implementation specific, i.e.
it is a way how an object handles the message, but it can be
completely arbitrary.
I think that indeed, it is a big industry's fault being unable to
grasp simple and basic idea of message passing
and replace it with horrible crutches with tons of additional
concepts, which makes it hard
for people to learn (and therefore be effective with OOP programming).
yeah.
although a person may still implementing a lot of this for sake of
convention, partly because it is just sort of expected.
for example, does a language really need classes or instances (vs, say,
cloning or creating objects ex-nihilo)? not really.
then why have them? because people expect them; they can be a little
faster; and they provide a convenient way to define and answer the
question "is X a Y?", ...
I personally like having both sets of options though, so this is
basically what I have done.
meanwhile, I have spent several days on-off pondering the mystery of if
there is any good syntax (for a language with a vaguely C-like syntax),
to express the concept of "execute these statements in parallel and
continue when all are done".
practically, I could allow doing something like:
join( async{A}, async{B}, async{C} );
but this is ugly (and essentially abuses the usual meaning of "join").
meanwhile, something like:
do { A; B; C; } async;
would just be strange, and likely defy common sensibilities (namely, in
that the statements would not be executed sequentially, in contrast to
pretty much every other code block).
I was left also considering another possibly ugly option:
async![ A; B; C; ];
which just looks weird...
for example:
async![
{ sleep(1000); printf("A, "); };
{ sleep(2000); printf("B, "); };
{ sleep(3000); printf("C, "); }; ];
printf("Done\n");
would print "A, B, C, Done" with 1s delays before each letter.
_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc