RE: Pike 8.0 RC1

"Henrik Grubbstr?m (Lysator) @ Pike (-) importm?te f?r mailinglistan" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
>Didn't Pike (µlpc, LPC) originally allow 0() with a result of 0, so
>that "/some/object"->do_something() didn't generate an error in case
>the object didn't have the function?

Correct in both cases. From µLPC 1.0E-30 src/interpret.c:

| void apply_shared(struct object *o,
|                   struct lpc_string *fun,
|                   int args)
| {
|   int fun_number;
|   fun_number = find_shared_string_identifier(fun, o->prog);
|   if(fun_number < 0)
|   {
|     pop_n_elems(args);
|     sp++;
|     sp->u.integer=0;
|     sp->type=T_INT;
|   }else{
|     apply_low(o, fun_number, args);
|   }
| }
| 
| void apply(struct object *o, char *fun, int args)
| {
|   int fun_number;
| 
|   fun_number = find_identifier(fun, o->prog);
|   if(fun_number < 0)
|   {
|     pop_n_elems(args);
|     sp->u.integer=0;
|     sp->type=T_INT;
|     sp++;
|   }else{
|     apply_low(o, fun_number, args);
|   }
| }
[...]
| void apply_svalue(struct svalue *s, INT32 args)
| {
|   if(s->type==T_INT)
|   {
|     pop_n_elems(args);
|     push_int(0);
|   }else{
|     strict_apply_svalue(s,args);
|   }
| }

>(Sorry about the historic note.)

No problem :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.