[#57185] Cipher book for ruby — Shannon Fang <xrfang@...>

Hi all ruby gurus there,

16 messages 2002/12/01

[#57228] What do some of Ruby's symbols mean? — "Gavin Sinclair" <gsinclair@...>

This could do with some community input before going to the FAQ. The format

31 messages 2002/12/01
[#57234] Re: [FAQ] What do some of Ruby's symbols mean? — dblack@... 2002/12/01

Hi --

[#57237] Re: [FAQ] What do some of Ruby's symbols mean? — Shannon Fang <xrfang@...> 2002/12/01

Hi David

[#57246] [Revised] What do some of Ruby's symbols mean? — "Gavin Sinclair" <gsinclair@...>

Thanks for the instant feedback. And apologies for the offensive late-night

11 messages 2002/12/01

[#57337] Memory consumption problem with recursion — squidster@... (Squidster)

Fellow Rubyists/Rubyians/Rubyans,

10 messages 2002/12/02

[#57349] [Revised again] What are the non-alphanumerical symbols in Ruby code? — "Gavin Sinclair" <gsinclair@...>

Folks,

13 messages 2002/12/02

[#57380] Ruby Book for People Who Aren't (Yet) Programmers — "Chris" <nemo@...>

Hello,

11 messages 2002/12/02

[#57403] Newsgroup — Daniel Carrera <dcarrera@...>

Hello,

28 messages 2002/12/02
[#57409] Re: Newsgroup — "Chris Morris" <chrismo@...> 2002/12/02

In addition, this mailing list is a mirror of the newsgroup, so there's no

[#57411] Re: Newsgroup — Daniel Carrera <dcarrera@...> 2002/12/02

Ruby Book for People Who Aren't (Yet) Programmers

[#57412] Re: Newsgroup — Mauricio Fern疣dez <batsman.geo@...> 2002/12/02

On Tue, Dec 03, 2002 at 04:50:10AM +0900, Daniel Carrera wrote:

[#57438] Re: Newsgroup — Daniel Carrera <dcarrera@...> 2002/12/03

> You might already have received it by now. Get used to receiving the

[#57439] Re: Newsgroup — "Gavin Sinclair" <gsinclair@...> 2002/12/03

[#57440] Re: Ruby Book for People Who Aren't (Yet) Programmers — Daniel Carrera <dcarrera@...> 2002/12/03

> I heard a little while back that there might be a Ruby book in the works for

[#57480] Re: Ruby Book for People Who Aren't (Yet) Programmers — Martin DeMello <martindemello@...> 2002/12/03

Daniel Carrera <dcarrera@math.umd.edu> wrote:

[#57598] Class variables problem — Peter Hickman <peter@...>

I have used

16 messages 2002/12/04

[#57694] Re: Ruby Book for People Who Aren't (Yet) Programmers — "Bill Kelly" <billk@...>

Hi,

13 messages 2002/12/05

[#57735] Re: elseif? — "Shannon Fang" <xrfang@...>

How about a vote? I vote to add elseif as an alternative... Least

20 messages 2002/12/05

[#57816] ratlast 0.1 -- embedded FORTH in Ruby — Mark Probert <probertm@...>

18 messages 2002/12/05

[#57826] Re: elseif? — "Ted" <ted@...>

Yuk! Ruby was presented to me as a 'clean' language.

38 messages 2002/12/05

[#57833] on error resume next — Shannon Fang <xrfang@...>

Hi,

22 messages 2002/12/05

[#57856] Buffered output on Windows — "Chris Pine" <nemo@...>

Quick question:

26 messages 2002/12/05

[#58093] Thank God for backups — Daniel Carrera <dcarrera@...>

I was working on the tutorial just now and wanted to delete all the *~

48 messages 2002/12/07
[#58096] Re: Thank God for backups — "Gavin Sinclair" <gsinclair@...> 2002/12/07

From: "Daniel Carrera" <dcarrera@math.umd.edu>

[#58188] The Ruby Way — Daniel Carrera <dcarrera@...>

What do people think of "The Ruby Way"?

18 messages 2002/12/08

[#58394] Ruby BUG when using PStore and fork — Jeremy Henty <jeremy@...>

PStore does not appear to play well with fork. This script

20 messages 2002/12/09

[#58438] warnings -w — Daniel Carrera <dcarrera@...>

Hello,

20 messages 2002/12/10
[#58439] Re: warnings -w — matz@... (Yukihiro Matsumoto) 2002/12/10

Hi,

[#58441] Re: warnings -w — Daniel Carrera <dcarrera@...> 2002/12/10

> It sets $VERBOSE to true, and gives you extra warnings on parsing.

[#58444] Re: warnings -w — matz@... (Yukihiro Matsumoto) 2002/12/10

[#58446] Re: warnings -w — Daniel Carrera <dcarrera@...> 2002/12/10

> |Thanks. Can you give me an example of a parsing warning that it would

[#58447] Re: warnings -w — matz@... (Yukihiro Matsumoto) 2002/12/10

Hi,

[#58473] Problems transporting nil values using XMLRPC (net/http ?) — Martin Hart <martin@...>

12 messages 2002/12/10

[#58479] Pymacs in ruby? — "Mike Campbell" <michael_s_campbell@...>

This is probably way, way OT, but has anyone considered something along the

15 messages 2002/12/10

[#58597] calling a perl script — max <max@...>

hi

17 messages 2002/12/11

[#58657] functional programming "style" — "zesar" <i_wont@...>

i discovered ruby some weeks ago and i have to say now that i'm through with

13 messages 2002/12/11

[#58662] Re: The coolest thing since sliced bread — "Garriss, Michael" <Michael.Garriss@...>

Ugh! Free write forces users into a new editor? I'm lost without Vim.

21 messages 2002/12/11

[#58677] help -- persuade my boss to adopt ruby — Shannon Fang <xrfang@...>

Hi Ruby Lovers,

18 messages 2002/12/11

[#58689] Re: [ANN] jabber4r 0.3.0 (doesn't work with raa-install) — ptkwt@...1.aracnet.com (Phil Tomson)

15 messages 2002/12/11
[#58751] Re: [ANN] jabber4r 0.3.0 (doesn't work with raa-install) — ptkwt@...1.aracnet.com (Phil Tomson) 2002/12/12

In article <20021211171825.GA2345@localhost.localdomain>,

[#58724] Problem loading extensions in OSX 10.2.2 — Dave Thomas <Dave@...>

12 messages 2002/12/12

[#58730] Re: do I really not understand inheritance?? — "Chris Pine" <nemo@...>

AHA!!!

22 messages 2002/12/12
[#58769] Re: do I really not understand inheritance?? — dblack@... 2002/12/12

Hi --

[#58785] Re: do I really not understand inheritance?? — "Chris Pine" <nemo@...> 2002/12/12

Hmm.... I see what you're saying, I think. I was going to give you a

[#58819] Re: do I really not understand inheritance?? — dblack@... 2002/12/12

Hi --

[#58738] Re: help -- persuade my boss to adopt ruby — "Ted" <ted@...>

Dang! Ugly American idioms...

15 messages 2002/12/12
[#58742] Re: help -- persuade my boss to adopt ruby — "Russ Freeman" <russ@...> 2002/12/12

My advice:

[#58804] Re: help -- persuade my boss to adopt ruby — "Shannon Fang" <xrfang@...>

>it's the MATZ'S position that Ruby will never be REAL WORLD language.

102 messages 2002/12/12
[#59295] Re: help -- persuade my boss to adopt ruby — "Rich" <rich@...> 2002/12/17

The problem lies in the fact that these statements are equal:

[#59325] Re: help -- persuade my boss to adopt ruby — Austin Ziegler <austin@...> 2002/12/17

On Tue, 17 Dec 2002 16:49:47 +0900, Rich wrote:

[#59407] Re: help -- persuade my boss to adopt ruby — "Gavin Sinclair" <gsinclair@...> 2002/12/18

From: "Dan Sugalski" <dan@sidhe.org>

[#59161] Re: help -- persuade my boss to adopt ruby — "Hal E. Fulton" <hal9000@...> 2002/12/16

----- Original Message -----

[#59181] Re: help -- persuade my boss to adopt ruby — "Bulat Ziganshin" <bulatz@...> 2002/12/16

Hello Hal,

[#58870] replace setup.rb/install.rb with builtin module — ptkwt@...1.aracnet.com (Phil Tomson)

I proposed this idea last night on the tail-end of another thread and on

10 messages 2002/12/12

[#58913] Inheritance Question — Jim Freeze <jim@...>

Hi

38 messages 2002/12/12
[#58957] Re: Inheritance Question — "Gavin Sinclair" <gsinclair@...> 2002/12/13

From: "Jim Freeze" <jim@freeze.org>

[#58973] Re: Inheritance Question — Jim Freeze <jim@...> 2002/12/13

On Friday, 13 December 2002 at 15:45:27 +0900, Gavin Sinclair wrote:

[#58974] Re: Inheritance Question — ts <decoux@...> 2002/12/13

>>>>> "J" == Jim Freeze <jim@freeze.org> writes:

[#58993] Re: Inheritance Question — ahoward <ahoward@...> 2002/12/13

[#58998] Re: Inheritance Question — ts <decoux@...> 2002/12/13

>>>>> "a" == ahoward <ahoward@fsl.noaa.gov> writes:

[#59002] Re: Inheritance Question — ahoward <ahoward@...> 2002/12/13

On Sat, 14 Dec 2002, ts wrote:

[#59003] Re: Inheritance Question — ts <decoux@...> 2002/12/13

>>>>> "a" == ahoward <ahoward@fsl.noaa.gov> writes:

[#59108] un-extending objects — dblack@...

Hi --

17 messages 2002/12/15

[#59174] Toward ruby-lang.org renewal; trial website offered — matz@... (Yukihiro Matsumoto)

Hi,

33 messages 2002/12/16
[#59202] Re: Toward ruby-lang.org renewal; trial website offered — Trevor.Jenkins@... (Trevor Jenkins) 2002/12/16

On Mon, 16 Dec 2002 14:26:19 +0900, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#59203] Re: Toward ruby-lang.org renewal; trial website offered — Tim Bates <tim@...> 2002/12/16

On Mon, 16 Dec 2002 08:11 pm, Trevor Jenkins wrote:

[#59204] Re: Toward ruby-lang.org renewal; trial website offered — "NAKAMURA, Hiroshi" <nahi@...> 2002/12/16

Hi, all,

[#59343] OT: Functional Language Recommendation — Wai-Sun Chia <waisun.chia@...>

Sorry for the OT post, but I need some advise from some like-minded

23 messages 2002/12/17

[#59392] Re: [OT] RE: help -- persuade my boss to adopt ruby — "Austin Ziegler" <austin@...>

> Ok, I confess: I know nothing about data

10 messages 2002/12/17

[#59508] ANN: FXRuby-1.0.17 Now Available — Lyle Johnson <lyle@...>

-----BEGIN PGP SIGNED MESSAGE-----

15 messages 2002/12/18
[#59518] Re: ANN: FXRuby-1.0.17 Now Available — Jim Freeze <jim@...> 2002/12/18

On Thursday, 19 December 2002 at 2:51:08 +0900, Lyle Johnson wrote:

[#59537] Re: ANN: FXRuby-1.0.17 Now Available — Lyle Johnson <lyle@...> 2002/12/18

Jim Freeze wrote:

[#59568] Re: ANN: FXRuby-1.0.17 Now Available — Jim Freeze <jim@...> 2002/12/19

On Thursday, 19 December 2002 at 7:11:59 +0900, Lyle Johnson wrote:

[#59617] Re: ANN: FXRuby-1.0.17 Now Available — Lyle Johnson <lyle@...> 2002/12/19

Jim Freeze wrote:

[#59635] FXRuby and OS X 10.2 (Re: ANN: FXRuby-1.0.17 Now Available) — Brian Wisti <brian@...> 2002/12/19

Hi Lyle,

[#59564] Test::Unit 0.1.5 — <nathaniel@...>

What with all the holiday cheer going around (who can't be cheerful with

24 messages 2002/12/19
[#59621] Re: [ANN] Test::Unit 0.1.5 — Lyle Johnson <lyle@...> 2002/12/19

nathaniel@NOSPAMtalbott.ws wrote:

[#59625] Re: [ANN] Test::Unit 0.1.5 — <nathaniel@...> 2002/12/19

Lyle Johnson [mailto:lyle@users.sourceforge.net] wrote:

[#59808] ANN: FreeRIDE 0.5.0 Release Candidate 1 — "Curt Hibbs" <curt@...>

[drum roll...]

24 messages 2002/12/23

[#59834] ruby-dev summary 19069-19150 — TAKAHASHI Masayoshi <maki@...>

Hello all,

15 messages 2002/12/24

[#59854] ANN: ruby 1.6.8 — matz@... (Yukihiro Matsumoto)

Hello everyone,

16 messages 2002/12/24

[#59954] 1210 / 100 = 12? what? — Tom Sawyer <transami@...>

can someone explain this to me:

35 messages 2002/12/27
[#59955] Re: 1210 / 100 = 12? what? — Gavin Sinclair <gsinclair@...> 2002/12/27

Hello Tom,

[#59957] Re: 1210 / 100 = 12? what? — Tom Sawyer <transami@...> 2002/12/27

no i didn't realize that. i thought ruby would automatically change it to a

[#59962] Re: 1210 / 100 = 12? what? — Brian Wisti <brian@...> 2002/12/27

Hi Tom,

[#59968] Re: 1210 / 100 = 12? what? — Tom Sawyer <transami@...> 2002/12/27

On Thursday 26 December 2002 11:42 pm, Brian Wisti wrote:

[#59984] Re: 1210 / 100 = 12? what? — Philipp Meier <meier@...> 2002/12/27

On Fri, Dec 27, 2002 at 04:10:59PM +0900, Tom Sawyer wrote:

[#59985] Re: 1210 / 100 = 12? what? — Lloyd Zusman <ljz@...> 2002/12/27

Philipp Meier <meier@meisterbohne.de> writes:

[#60006] Ruby & Preprinted forms - will they work together? — colotechpro@... (John Reed)

I'm a Ruby newbie, but I've decided to write a commercial application

18 messages 2002/12/27

[#60016] Installing Fox, FXRuby and fxscintilla — Daniel Carrera <dcarrera@...>

I want to try out FreeRide, but just installing its dependencies has been

22 messages 2002/12/27
[#60018] Re: Installing Fox, FXRuby and fxscintilla — Lyle Johnson <lyle@...> 2002/12/28

Daniel Carrera wrote:

[#60050] RAA suggestions — Gavin Sinclair <gsinclair@...>

1. Reserve "what's new" for genuinely new packages. Introduce a

15 messages 2002/12/28

[#60146] rbbr 0.2rev1 bombs out! — Wai-Sun Chia <waisun.chia@...>

rbbr is looking for a rbbr/config.rb module which is non-existent..

20 messages 2002/12/30
[#60147] Re: rbbr 0.2rev1 bombs out! — Masao Mutoh <mutoh@...> 2002/12/30

Hi,

[#60149] Re: rbbr 0.2rev1 bombs out! — Wai-Sun Chia <waisun.chia@...> 2002/12/30

Huh?

[#60188] Range#size — Martin DeMello <martindemello@...>

I think I missed something - why is Range#size (and all its synonyms)

19 messages 2002/12/30
[#60210] Re: Range#size — matz@... (Yukihiro Matsumoto) 2002/12/31

Hi,

[#60223] Re: Range#size — Gennady Bystritsky <bystr@...> 2002/12/31

From: Gennady F. Bystritsky <gfb@tonesoft.com>

[#60206] Developing a website — "Shashank Date" <sdate@...>

I am planning to use Ruby to develop a website which will be hosted on

17 messages 2002/12/31

[#60217] ENV.clear — zhoujing@... (TOTO)

I tried

15 messages 2002/12/31

[#60221] win32_popen 0.1 — "Park Heesob" <phasis@...>

Hi, all.

15 messages 2002/12/31

Re: Ruby ++, the one element and generators

From: Mauricio Fern疣dez <batsman.geo@...>
Date: 2002-12-01 20:01:35 UTC
List: ruby-talk #57289
WARNING: rather long.

On Sun, Dec 01, 2002 at 06:22:27AM +0900, Chris wrote:
> The problem is simple:
> 
> Q:  Why isn't "x++" just syntax sugar for "x += 1"?
> 
> A:  Because in C, for example, "x++" doesn't mean "x += 1"!
> 
>   int x, y, z;
> 
>   x = 5;
>   y = x++;     //  y == 5
>   x = 5;
>   z = x += 1;  //  z == 6
> 
> It would confuse and upset C programmers, so best not to put it in.
> 
> 
> Remember, the following code could only be intended to mean two things:
> 
>   x = 5
>   x++
> 
> Either you want "++" to be a method, so you really meant so call the "++"
> method of the object 5; or you want "++" to be syntax sugar, which we have
> already seen is a bad idea (confusing and counter-intuitive).

I believe there's yet another (insane) answer:
        trying to apply ++ on inmediate objects yields an error, for the
	associated Variable object is nil.

I think this leads to hell, but it's seductive enough to toy with it };^>

WARNING: here follows a rather long Gedankenexperiment, and the
reasoning path is shown almost complete (although I had to edit it a
couple times, in an iterative approach).

If we went along the line of "everything is an object", _variables_
themselves could be objects. In an expression matching
RE1 = /[_a-z][_a-zAZ1-9]*#{op}/ (where
op is some kind of operator such as '++'), the operator would
correspond to the call of a method of the variable object. The list of
such methods (seen as operators from the point of view of the value being
referenced to, but as methods from that of the variable in use) would be
hard-coded into the interpreter.

This is admitedly confusing, so perhaps the following will render it
clearer:

a = 1    # _two_ objects involved here: inmediate '1'
         # and a Variable whose value can be represented as :a (it's
         # related to symbols in a way, but a Variable object has also
         # some information on the scope of the var (not only the name)
p a == 1 # instance method '==' called on inmediate value object '1'
a++	 # instance method '++' applied to an anonymous object of class
	 # Variable, holding a reference to the inmediate value object
	 # of class Fixnum '1'

I will call such 'instance method of objects of class Variable'
vmethods (stands for variable methods).

When finding some expression matching RE1, the interpreter would have to
decide whether to call a regular method on the object being referred to
by the variable or the vmethod of the latter. A number of operator
look-alike tokens could be chosen to always mean 'this is a vmethod'.
An obvious candidate would be '++'.

Such vmethods could be defined internally, (that is implemented in C in
Ruby's AST tree walker), but another possibility would be giving a
more complete reflection of the code:

class Variable # all vars will derive from this one
 def ++(*args)
	old = @referee
	@referee = @referee.next # (or += 1 or something)
 	old
 end

 # @referee is a magical attribute defined by Ruby
 # this is the new 'reflective' thing needed for this code to be
 # possible (besides the new vmethod semantics)
end

Notice that, given some kind of Number class with Number#puts
the following would happen
    	a = Number.new(1)
	(a++).puts       # writes '1'
this seems to be what we want for the postfix '++'.

Then we might want to overload the '++' vmethod (no longer an operator
if you consider from the Variable point of view), and a natural
extension in Ruby would be 

a = getSomeIterator()
class <<< a
 # we want to add overload instance methods of the singleton class of 
 # the Variable object!!!
 # that is, create a singleton vmethod
 def ++(*args)
 # this is meant to be an iterator
	@referee.pointToNextElement
 end
end 

So far so good, we have 
 * a clean separation between regular instance methods and vmethods
  	(normally distinction on a lexical level)
 * a way to overload these vmethods per variable (singleton vmethods)

I can already hear you cry about prefix (no-longer-)operators,
and we're all wondering the possible use of *args...

The answer is of course... redefining the '++' vmethod of the variable
referring to the top-level object!!!

	self   		# -> top-level object, variable of type Object
	class Variable
	  def pre++
	    @referee = @referee.next # or += 1, default implementation
	  end
	end

	class <<< self
	  def ++(arg)   # arg is the ref to the rhs Variable object 
		arg.send :pre++
	  end
	end
	a = 1	  	# a refers to object '1'
	++a	  	# now points to object '2'
	puts(++a) 	# puts '3'

Why did I write the ()'s? Well, we need some way to have Ruby know that
it is to do 
	puts(++a)
and not 
	(puts++) a
for the second one would try to call the '++' vmethod of nil (cause no
variable named 'puts' exists). We could say that the '++' "in the
middle" always binds to the right variable, but I'll later give one
reason why we could possibly not want this rule :)
 
So, looking for another solution, the following comes to mind:
I think matz's last thought on style (and we all trust him on this :) is
that parenthesis are a good thing (I think Ruby was beginning to warn
about parenthesis being needed in future versions in some contexts) in
many occasions, and this one seems at first sight one of them.
But then we realize that this is in fact the very same problem we have
with methods vs local variables, and the trick there was to draw the
difference during parsing. Quoting from the Pickaxe

\begin{quote}
  When Ruby sees a name such as ``a'' in an expression, it needs to
  determine if it is a local variable reference or a call to a method with
  no parameters. To decide which is the case, Ruby uses a heuristic. As
  Ruby reads a source file, it keeps track of symbols that have been
  assigned to. It assumes that these symbols are variables. When it
  subsequently comes across a symbol that might be either a variable or a
  method call, it checks to see if it has seen a prior assignment to that
  symbol. If so, it treats the symbol as a variable; otherwise it treats
  it as a method call. As a somewhat pathological case of this, consider
  the following code fragment, submitted by Clemens Hintze.

def a
  print "Function 'a' called\n"
  99
end


for i in 1..2
  if i == 2
    print "a=", a, "\n"
  else
    a = 1
    print "a=", a, "\n"
  end
end

Produces:
a=1
Function 'a' called
a=99
\end{quote}

This is the very same kind of problem we're facing here!!!
In 'puts ++ a' we don't know what to bind '++' to. A heuristic as the
former would mean that 'puts ++ a' means
 * puts(++a) if there's been no assignment of the form 'puts=...' before
 * puts++(a) if there has been one. Then fail horribly (or not, more on
   that later...) because functions (or rather methods) are not first
   class values in Ruby (so we cannot meaningfully 'increment one')
Yet another easier way (which enforces a particular spacing) is having
to attach '++' to the variable it's applied to:
	puts++a 	# illegal, syntax error
	puts ++ a	# illegal, what is is attached to?	
	puts++ a	# do (puts++)(a)
The later sentence would normally fail because we cannot 'increment' a
method. But what if [methods were first class values in Ruby]

	class <<< Kernel.puts
	  def '++'
	    # do some magic with @referee
	  end
	end

Unless Ruby becomes another FP, the latter is useless (or rather
impossible to use).


But there's even another new possibility if we have Variable objects:
implementing the '()' "around-fix" vmethod:
 	class Function
   	  def initialize(val)
	    @val = val
	  end
 	end 
 	b = Function.new(0)
 	class <<< b 
   	  def (*args)	# maybe we need something to name this 'operator()'
		# do something, such as...
		ret = @val + @args.size
		puts "#{@val} + number of args => #{ret}"
		ret
    	  end
 	end
 	b("one", "two", "three")   # => 3

We then need the quite complex heuristic introduced before, instead of
taking "'puts++a' means puts(++a) always" because we might want to be
able to omit the parentheses, mirroring what is happening now in Ruby 
(continues the last example)
	class <<< b
	  def ++
	    @val += 1
	  end
	end 
	a = 1
	b ++ a  	# => 1
	b a		# => 2
	++b a		# => 3
	b a		# => 3 

There's only one problem left: what happens in
	class A
	  a = 1
	  ++a    # calling the ++ vmethod of the 'Variable' A
	end

Ruby will try to run (check the example about redefining '++' for the top-level
object) the '++' vmethod of the 'A' constant. There's two pbs. there:
 * the vmethod is called on an object of class Variable which happens to
   be referring to a constant. We solve it by changing the name of that
   class to a more sensible name: NameBinding or something 
 * that vmethod is not defined!!! Solved if we define 

	class Object
	  def ++(arg)   # arg is the ref to the rhs NameBinding object 
		arg.send :pre++
	  end
	end
  
 this will work as it's the only way that vmethod can be used, for in
every other (postfix) context '++' is taken as the vmethod related to
the pertinent NameBinding.

You might wonder where this 'pre++' came from... it was in fact already
present in the third example, since I cheated and modified it while
writing these lines :) It is a vmethod used to do the prefix ++ thing.

Finally, there's the issue of other "NameBindings" such as 
 * attributes
 * locals inside blocks
The latter are handler exactly the same way, for the former the parser
must be wise enough to see that @a++ means (@a)++ and not @(a++).

One last concern: what is the meaning of 
	a = 1
	(a++)++  	# a++++   ?

Surprisingly enough, the proposed implementation of NameBinding#++
does the right thing!
	(a++)++  	# => 1    a == 3
We just have to remember that _when given a receiver_, the #++ vmethod
is always called on the related variable, not on the "value". This
relates the #++ distinction issue to the way access restrictions are done
(ie no receiver allowed => use self).

BTW, this will fail:
	1++++		# '++' called on NameBinding nil
and it's what we had always wanted, for changing such an inmutable
object is meaningless.

This thought experiment shows what would happen if things where
evaluated in two different contexts: "value" and "name binding"
(== variable, but not always). So you can relate it to Perl's contexts,
and dislike it for that reason.

You might also find it to be some kind of "call by name"-like semantics
extended the whole language, and detest it for that reason. 

Maybe you can associate it with the complexity of Common Lisp's macros,
and detest it for that reason.

Or you could think that this is nothing but C++ in disguise, with
references la Java working like pointers, and operator(), and abhor
it for that reason.

If you actually like it (or thinking about it), you're really into 
_nasty_ things. I am too :)

My head hurts slightly now. :-P

I'd anyway appreciate comments on why this is foolish.
Were it not, and had nobody else thought of it before (which I doubt),
I'd retain all the credit for myself }};-)

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Not only Guinness - Linux is good for you, too.
	-- Banzai on IRC

In This Thread