–
Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)
The Ruby Tk constructors could replace the current instance_eval trick
with this syntax and lose the confusing scoping rules.
This looks nice. Only thing is the havoc one could write
with the ? operator, and Symbols:-
wossname a: 3 b: r ? x : y c: :d
but then anything can be obfuscated… Is this frightening enough to
require some other form? The chances of anyone writing real code like
that compare to a Snowball in hell, so I’m just playing Devil’s Advocaat
here…
Are you saying you disapprove of this choice for named parameters?
If you disapprove, I agree. If you approve, I disagree. Confused
yet? (If you don’t approve, I can’t help but refrain from not
disagreeing.)
Sorry - my typing’s getting worse. I disapprove of ‘=’, approve of
‘:’, even more so if the comma is optional before a ‘name:’ symbol.
You should also be aware of the syntax for possible type annotations that
could be added in the future to help a compiler, as is the case in Dylan as
I recall.
Removing commas make programs look more like Smalltalk, but it will
make the language something but Ruby.
Dave, you have asked me once about the secret of Ruby’s good design.
I answered then, I didn’t know. I didn’t even know why others did not
come out with their languages just as good as Ruby.
I think I now understand the secret. It’s “style”, and from what I’ve
learned recently, the “style” is the most difficult word in English,
probably in other human languages too.
class Test
def AMethod?
puts “Ho Ho HO”
end
end
a = Test.new
a.AMethod?
It could be a method (maybe to be defined later), and Ruby seems to
take it as such…
If Ruby had to check whether a constant exists already or not, the
language would no longer be context-free.
···
On Tue, Aug 13, 2002 at 01:15:11AM +0900, Dossy wrote:
Removing commas make programs look more like Smalltalk, but it will
make the language something but Ruby.
Dave, you have asked me once about the secret of Ruby’s good design.
I answered then, I didn’t know. I didn’t even know why others did not
come out with their languages just as good as Ruby.
I think I now understand the secret. It’s “style”, and from what I’ve
learned recently, the “style” is the most difficult word in English,
probably in other human languages too.
If I attempted to quantify Ruby’s “style”, I would probably paraphrase
(plagarize?) the introductions of several Ruby books and call it
flexible and legible, yet terse. Flexible, because of the adherence to
POLS as a design principle, gratuitous method aliasing both in the core
libraries and many well-written modules, and syntax which allows you to
chain operations via OO or logic operators.a Legible, because Ruby is
free of the pointless casting nonsense that pollutes other high-level
languages, because variable prefixes allow you to quickly determine
scop, and because thorough use of closures encourage simple encapsulated
code blocks. Terse, because unlike other languages, Ruby’s shortcuts,
such as built-in regular expression support and omitting semicolons,
rarely come at the expense of flexibility or legibility.
Of course, style is entirely subjective by nature, and I’m sure everyone
else has their own ideas about Ruby’s “style”.
Dave, you have asked me once about the secret of Ruby’s good design.
I answered then, I didn’t know. I didn’t even know why others did not
come out with their languages just as good as Ruby.
I think I now understand the secret. It’s “style”, and from what I’ve
learned recently, the “style” is the most difficult word in English,
probably in other human languages too.
–
Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)
–
Dossy Shiobara mail: dossy@panoptic.com
Panoptic Computer Network web: http://www.panoptic.com/
“He realized the fastest way to change is to laugh at your own
folly – then you can let go and quickly move on.” (p. 70)
If you really think that you can add named parameter with modifying *only*
the Init_* in the source of ruby than I think that perhaps you must look
at this source ...
Guy Decoux
···
On Wed, Jul 31, 2002 at 01:46:08AM +0900, ts wrote:
complete change of the Ruby source; you need only change the Init_*
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
???
Are you asking my why I am saying this or what I mean by Init_*?