Default argument values for blocks

T

Trans

that's the point - it isn't 'needed'. unification is a great idea - but's
it's so much bigger that this thread it isn't even funny. until then, imho,
some new methods are in order.

All well said -a, perhaps matz will take a setback and consider all
this from a higher plain.

T.
 
S

Sean O'Halpin

Hi,

In message "Re: Default argument values for blocks"
|For instance_eval, how about simply
|
| instance_eval(*args, &block)
|
|i.e. if it has a block, then the arguments are passed to it.
|e.g.
|
| instance_eval(1,2,3) {|a,b,c| ...}
| instance_eval(1,2,3, &block)

I will supply something behave like this, but with a different name
from instance_eval. I'm thinking of instance_exec() right now.

matz.

How about instance_call()? On the analogy with Proc.call().

Sean
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Default argument values for blocks"

|> Matz had also suggested the possibility of ;; for end. Which with your
|> concept would give.
|
|I seem to recall this suggestion was presented on 2005.04.01.

No. I presented it on June 7th, but I mentioned it as an
"April-fool-ish" thingy in my blog entry. 1.9 does understands double
semi-colon still.

matz.
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Default argument values for blocks"

|> Maybe. Some prefer verbosity to clarity. So what keyword you think
|> "the best"?
|
|In this case I think verbosity *is* clarity :) The -> thing really
|has a "line-noise" quality that looks very out of place to me.

I meant "prefer verbosity *for* clarity". Sorry for confusion.

matz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top