K
Kevin Olemoh
damn double post wierdness sorry.
So I take it you all just assume that people know the same things you
do? That is real smart, just assume that a person is going to be able
to read your mind when he comes across your work. You cannot make the
assumption that your code is going to be perfectly clear to an
individual other than yourself; this would be like expecting anyone to
have the exact same command of English as you do. In programming we
have facilities for at the very least informing someone what a given
line or block is the idea that you should not actually use this
facility because whatever you wrote is going to be obvious to anyone
reading your code is a joke.
So I take it you all just assume that people know the same things you
do? That is real smart, just assume that a person is going to be able
to read your mind when he comes across your work. You cannot make the
assumption that your code is going to be perfectly clear to an
individual other than yourself; this would be like expecting anyone to
have the exact same command of English as you do. In programming we
have facilities for at the very least informing someone what a given
line or block is the idea that you should not actually use this
facility because whatever you wrote is going to be obvious to anyone
reading your code is a joke.
Actually I am asking for ruby to allow me the freedom to make my own
code readable to me. I personally don't know perl so I can't comment
on Perl however I will say that the interpereter should know when you
are using a block and search for the do keyword or { and ignore the
newline. In other words a method that requires a block as a parameter
(like each) should *not* be terminated by a newline they should be
terminated either by a closing brace or tne end keyword. Grabbing the
user by the balls with respect to how the code is formatted is not a
good thing even if it is a side-effect of how blocks work in the
language.
Every spoken and written language has rules and conventions however
they all allow different ways to say one thing (some many more than
others.) all of them probably also have examples of unnessecary
rigidity however unlike programming languages spoken and written
languages are not exactly engineered in a controlled environment so
its not entirely possible to address those issues; it is indeed
possible with programming languages. So shouldn't things that can
adversly affect the readability of the language itself be addressed
since it is well within human capacity to do so?
The Firefox developers have been busy for about five years telling
people that there should not be an interface to change keybindings.
The gnome developers have been telling people that they don't need
various options for some time as well and they are definetly not right
on alot of those issues. Opera software has had ages to implement an
extension system yet they do little if anything at all while people
say that Opera does not need a robust extension system like the one in
Firefox (completely ignoring reality) Just because some "heavy" weight
says one thing does not make it right.
My whole point is that the interpereter should not have syntactic
rules that end up creating formatting requirements. As someone else
pointed out those two are indeed different so the question is really
"Should block parameters break because of a newline before '{' ?" The
fact that {} is a parameter is not really even relevant to my request.
It just gives me insight into why the problem exists in the first
place.
I confess I haven't really followed this thread carefully, but--I
totally agree on the 'elsif' keyword. Wouldn't it be possible for ruby
to accept *either* spelling?
If so, I would definitely advocate it--you don't lose anything for the
perlsters, and those of us coming from other languages won't have to
deal w/the IMHO surprising spelling.
I remember dealing w/this same issue while learning pl/sql. After
staring at my modest program for like 40 minutes looking for the
complained-of syntax error, I was bitter bitter bitter when I finally
learned that I was expected to mis-spell 'else'...
I actually thought ruby did this already--had to write a little script
to verify that it doesn't...
Languages do
lots of things differently from each other. Some day they may all
converge, but that convergences doesn't have to be called Ruby
Hi --
I confess I haven't really followed this thread carefully, but--I
totally agree on the 'elsif' keyword. Wouldn't it be possible for ruby
to accept *either* spelling?
If so, I would definitely advocate it--you don't lose anything for the
perlsters, and those of us coming from other languages won't have to
deal w/the IMHO surprising spelling.
I remember dealing w/this same issue while learning pl/sql. After
staring at my modest program for like 40 minutes looking for the
complained-of syntax error, I was bitter bitter bitter when I finally
learned that I was expected to mis-spell 'else'...
I actually thought ruby did this already--had to write a little script
to verify that it doesn't...
When you're using Ruby, it's best just to come from Ruby. Then you
don't have to be surprised by things like this, or feel any resentment
toward Ruby for failing to be C or Java or whatever. Languages do
lots of things differently from each other. Some day they may all
converge, but that convergences doesn't have to be called Ruby
David
--
David A. Black | (e-mail address removed)
Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com | [4] http://www.rubycentral.org
But isn't almost everybody coming from *somewhere*? This seems to me a
cost-free change--a win-win...
But isn't almost everybody coming from *somewhere*? This seems to me a
cost-free change--a win-win...
Hi --
But isn't almost everybody coming from *somewhere*? This seems to me a
cost-free change--a win-win...
But then if a Rubyist starts learning Java, Java has to change to make
the Rubyist happy. And C has to change to make Haskell programmers
happy. And Python has to change to make Smalltalk programmers happy.
And so on.
It seems to me it's best to break the cycle. Of course languages
evolve from, and borrow from, each other. But they don't incur an
obligation to add features and behaviors simply because practitioners
of other languages are used to those features and behaviors. It's
better just to get used to the language you're using, when you're
using it.
David
--
David A. Black | (e-mail address removed)
Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3]
DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4]
[1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com
[2] http://dablog.rubypal.com | [4] http://www.rubycentral.org
I wanted to add that it may not be so advantageous to have so many
programming languages;unlike spoken languages which actually benefit
from their diversity since they are allow humans to create entirely
new concepts. Programming languages are somewhat restricted by how
hardware actually works and hence perform the same functions with
different ways of getting to the same result. Perhaps one method of
dealing with the current trend of programmers being schooled in two or
more languages just to be marketable is to try to standardize the
behavior of various constructs across languages so things work more
the same across the board. Granted this does happen somewhat
naturally already what I am postulating is that it may be advantageous
to actively try to direct this phenomena.
It would keep things like this from happenning:
a bunch of languages support +=3D as a shorthand for incrementing accumul= ators
A SQL implementation comes along and does not support this relatively
common short hand..WTH Why???
Anyway that is a discussion unto itself.
All I said was that perhps there needs to be a movement to remove some
of the differences in the behavior of programming languages; in effect
an effort analogus to the movement to have a set of standards for html
design so that coders don't have to code differently for four and five
browsers, not to mention accounting for the bugs within those browsers
that affect how pages are rendered.
What you are suggesting is that the differences between languages are
a good thing and thinking in different ways given the structure of a
language is a good thing, and you are correct to a point the diversity
also makes it more difficult for people to work effectively because
they have to deal with two and three sometimes totally different ways
of thinking.
This kind of thing makes communication between different people more
difficult than it would be if there was a common language that both
could use to communicate. Saying that I am naive for suggesting this
is like suggesting that it is a good idea to expect business people to
speak nearly every language currently spoken on earth rather than
gravitating towards a common language simply because the other
languages exist in the first place.
There are cultural differences; trying to make everything a monoculture
is arrogant, ignorant, and ultimately stultifying.
This whole discussion reminds me of the old joke:
What do you call someone who speaks two languages?
Bilingual.
What do you call someone who speaks three languages?
Trilingual.
What do you call someone who speaks on language?
An American.
You know, there are some things about French which I think we should
change English to use.
Take this <<short word>> and his adjective following. Is it not
that we should put the adjective after his noun, like this <<word
short>>? Then the people french would be some people happier, when
they spoke some english! Not is that?
It would seem to be a situation win-win, not is that?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.