Robert Dober wrote:
> Please define "dangerous", I do not have the most remote idea what might be
> dangerous, apart of modifying state, which is "modifying instance variable".
>   
Dangerous is any function that modifies the caller. Thus 
fred.gsub(/[aeiou]/, '*') does not modify fred, it returns a new object 
that is the result of gsub(/[aeiou]/, '*') being applied to fred. 
However fred.gsub!(/[aeiou]/, '*') both returns a new object that is the 
result of gsub(/[aeiou]/, '*') being applied to fred *AND* modifies 
fred. Most methods in Rudy do not modify the caller but return a new 
object. So anything that behaves differently / unexpectedly is 
dangerous. In Ruby most (if not all) the classes that have ! methods 
also have non ! version that does not alter the caller. This has been 
explained before but I can't remember which id the thread starts at. I 
expect someone will be able to point this out.
> I do not want to change Ruby, but the basic idea to have a clear syntactic
> definition of what is "read only" access and what is "write" access  seems
> very appealing to me.
>
>   
Methods have nothing to do with "read only" and "write" access. I don't 
know where you got this concept from but it is clearly confusing you, 
discard the concept, it is hindering your understanding of what Ruby is 
actually doing.

> * The first and most important reason is a practical one
> How great for debugging and maintenance of code, you will never have to
> examine methods not ending with ! if you are searching for the reason of
> some strange value.
> Look at a C++ developper, she will never have to look into methods declared
> with "const", and
> do you really think Ruby should be outclassed by C++?
> And it would be much better than in C++ because the information is conveyed
> at declaration and at usage.
>
>   
This doesn't make the slightest bit of sense to me.
> * The second reason is that this is only the surface of the iceberg
> It will be a revolutonary concept, think about classes.
> Only classes with names ending in "!" can be subclassed.
> Or classes not ending with "!" will become unmodifiable as Java::String or
> python::string
> There are for sure much more ideas, and much better ideas, that will spring
> into the mind of
> much more informed people than your humble servant.
>
>   
Ruby is a dynamic language, thus you can change classes. In fact is it a 
very powerful concept (revolutionary even). If you want B&D then go 
ahead and use Java (by the way you can modify unmodifiable Java Strings) 
but the reason that people like Ruby is that they can get things done 
without the language getting in the way.
> * The third reason is that I always felt unsure of !,? and = at the end of
> method names
> Try to use this method
> class Bad; def a=; puts "very bad"; end; end
> So "!", "?" do not have the same kind of impact than "=", not too much
> orthogonal, is it?
>
> Enforcement (late but never theless ) of "=" is already "rubyish", why
> should "!" (or "?", please see below) not be?
>
>   
I was going to answer this and your other points but frankly I get the 
impression that you don't know enough about programming to understand 
the answers. A lot of the converts to Ruby are programmers with many 
years experience who found, like myself, that they could get the job 
done in Ruby much easier than the various languages that they had been 
using for years. That was the revolutionary concept and you seem to have 
missed it completely.