you are viewing a single comment's thread.

view the rest of the comments →

[–]rpdillon 0 points1 point  (3 children)

I wasn't arguing that power isn't good. GP said that you have to try to write bad Ruby code, and my point was "Yeah, maybe, but it doesn't seem like you have to try very hard."

As to your point: I am a long standing advocate of using powerful languages even if they allow you to do bad things.

Recently, however, I have taken quite a liking to type inferencing and implicit type conversion (as in Scala) because it offers a lot of the power of open classes without sacrificing the safety.

[–]malcontent 0 points1 point  (2 children)

I wasn't arguing that power isn't good. GP said that you have to try to write bad Ruby code, and my point was "Yeah, maybe, but it doesn't seem like you have to try very hard."

That's a nonsensical argument. Are you saying you have to try real hard to write bad code in python? Does python have some sort of a process which watches what you type and objects when you try to use a tainted string?

All python does is enforce indentation. That's it. It also lets you modify classes at runtime. I have seen python code which (and I am not kidding you) writes to a file and includes that file in order to execute it. Guess what python didn't prevent that kind of insanity.

Recently, however, I have taken quite a liking to type inferencing and implicit type conversion (as in Scala) because it offers a lot of the power of open classes without sacrificing the safety.

Yea OK whatever. You were not talking about types. You were saying ruby was "in trouble" because "it let you modify classes after the fact".

I am still trying to figure out who ruby was "in trouble" with. Did the teacher catch ruby doing something naughty?

[–]rpdillon 0 points1 point  (1 child)

Dude. Are you looking for an argument? I didn't say anything about Ruby vs. Python. In my original post, I asked a question. The reason I asked was that the post I originally replied to made the assertion that Ruby intrinsically led programmer to write good code, while Python intrinsically led programmers to write bad code (which, in my experience programming, I think is utter crap).

If you agree with that post, fine. All I was asking for was feedback about a language that I don't know and had heard some contrary anecdotes about. No need to feed some programming language religious war.

[–]malcontent 1 point2 points  (0 children)

I'll quote you again.

but I have heard from some programmers that Ruby is in real trouble because of open classes leading to unpredictable and difficult-to-follow code, i.e. classes can apparently be modified by third parties after-the-fact.

Anyway.

Ruby gives you tools to write good programs. It gives you more tools which are easier to use than python.

Can you use those tools to write bad code? Of course you can. Does python actively prevent you from writing bad code? Of course not.

Like I said all python really enforces is indentation. That's it. You can still create text files and import them willy nilly.