--=-4YRHcRtL6Ph3yKlgTNRL
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Fri, 2002-08-30 at 08:35, William Djaja Tjokroaminata wrote:
> Can we pass the block from func2 to func1?  If yes, how?  (It seems there
> is no way to convert back from a Proc object to a block.)

this brings up some interesting notions, when i first read pickaxe, this
was the one thing i did not like about ruby. why are there three diffent
things for essentially the same construction: block, procs, and methods?
methods, i can see have a distinction in that they are tied on an
object, like an instance variable is, but still.

so then one is also left thinking, why not multiple blocks?

personally i wish { } brackets always represented a proc and that we
could pass them easily (and also not require a #call to execute them):

	def ameth(proc1, proc2)
	  proc1()
	  proc2()
	end

	ameth({puts 'hello'},{puts 'world'})

	> hello
        > world

then a proc...excuse me, a block, is just a Yeild-able proc. yes, that's
it.

~transami

--=-4YRHcRtL6Ph3yKlgTNRL
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA9b5mGITYvPhXYDikRAqjIAKC68/vFwRRB4Khui4RKcySu4hGFdQCZAZBE
5cZcL1wR3yGfAk3piqc9cLM=
=Cwt9
-----END PGP SIGNATURE-----

--=-4YRHcRtL6Ph3yKlgTNRL--