usually uses the infinitive…)
Well, according to Infinitive - Wikipedia
most modern grammarians don’t consider the imperative and present
subjunctive to be uses of the bare infinitive.
I think that the older view that they are the same might actually an
example of the trap of thinking that English grammar is the same as
or very similar to Latin grammar.
A good example of this is the old-fashioned prohibition against
splitting an infinitive. “To go boldly where no one has gone before,”
instead of “To boldly go where no one has gone before.” This came
from the fact that in Latin, and some of it’s descendants, the
infinitive was/a single word, so splitting an infinitive is
impossible, whereas in English the use of the full infinitive (to x)
is much more common than the bare infinitive, and splitting an
infinitive seems to be both commonly used and often sounds and flows
better. The prohibition, like not ending a sentence with a
preposition, is “something, up with which I will not put.”
As an analogy to what is commonly said here:
Ruby is not Java
Python is not Ruby
Ruby is not C++
English is not Latin
Le francais, n'est pas l'anglais.
Not that this is a big thing with me, I just find it interesting.
Not that it’s going to change, and it’s all water long under the bridge, but…
Those predicates are usually part of a larger expression.
We wouldn’t say
Give me my nine-iron, if does my bag have my nine-iron.
…if it’s true that my bag does have my nine-iron
“has”, “starts” and so on eliminate the ‘be’ verb in favor of
complicating (by conjugating) the original verb. Having lived as an
English speaker and studied other languages that both conjugate and do
not conjugate, I have to say I strongly prefer the latter. And before
you say it, yes we have to conjugate the verb ‘to be’ above, but
that’s all we’d ever have to conjugate.
because I’m a Ruby newbie AND a non-native english speaker, but I
that non-native English speakers tend to know way more about grammar
than native English speakers like me.
by force of nature, we have to study it to learn,
OTOH method names ending in “?” are hardly imparative forms [ I guess
that
was what Pete was refering to]
but why not making things easier and being more tolerant
in the beginning I had to correct #responds_to? with #respond_to? what
seemed a zillion times (I should have aliased it in Object anyway, but
when
I knew how to do that I did not need it anymore
.
Aliases are commonly used in Ruby Array#collect, Array#map etc
why not having them for flected forms
String#starts_with? <=> String#start_with?
personally I like String#prefix? and String#suffix? too, shorter and
very
precise.
Object#responds_to? <=> …
I guess it will make life easier for Newbies and let everybody use it’s
personal feeling for what sounds better.
Cheers
Rober
Pete Y.
–
Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.
I used to tell people I met in Zurich that I felt like I was Swiss
since my mother’s parents were German, my father’s parents were
Italian, et je parle un peu de francais!
I used to tell people I met in Zurich that I felt like I was Swiss
since my mother’s parents were German, my father’s parents were
Italian, et je parle un peu de francais!
Give me my nine-iron, if does my bag have my nine-iron.
In your current form I’d rather use a eight!
In situ which of these sounds better to the English speaker?
do_something if a.start_with?(‘foo’)
do_something if a.respond_to?(:fred)
I always found that one troubeling, but I do not consider that a
problem,
especially in the light that Matz is Japanese as you pointed ou below,
we
too often forget that.
all!
Amen, and as I said before, after 20 years of Ruby programming I just
mastered method_alias, or was it alias_method (long live ri ;).
Robert
–
Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.