What language is this? - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Ruby and Ruby on Rails (https://www.supportforums.net/forumdisplay.php?fid=55) +---- Thread: What language is this? (/showthread.php?tid=4916) |
RE: What language is this? - Wolskie - 02-26-2010 In Ruby you can use braces also instead of 'end' Juvenile or not, its easy and a more human way of doing things. The programming language should be for the programmer, not for the machine. If you want it the other way, use assembly . For example, when I start something e.g a block. When I want to finish it I think 'end' as in Start = Start End = end not Start = Start end = wtf? ---------------------------------- Ruby has a reference to the class in the class body. Ruby has continuations. Python does not RE: What language is this? - uber1337 - 02-27-2010 More like start = start body = tabbed end = back to the starting scope I would rather just press the backspace button once then have to write "end" or use braces. Why would you want to reference to the class in the class body(not bashing you I really don't understand) and as for continuations: http://blog.ianbicking.org/ruby-python-power.html Wrote:Ruby supports continuations. Python does not (except in Stackless again). Continuations are not widely used in real applications in either world, but they do open up the possibility for things like Borges (how exactly CherryFlow works in the absence of Stackless I'm not sure). One notable use of continuations in Ruby is for breakpoints in debuggers.Both languages have their ups and downs and again, if I started with Ruby and didn't hear of python until now, I'm sure I would be defending Ruby right now. here is another good article: http://blog.ianbicking.org/ruby-python-power.html RE: What language is this? - Wolskie - 02-28-2010 (02-27-2010, 08:27 AM)uber1337 Wrote: More like And you called us lazy in the other thread becuase we couldn't write 'import random' or what ever it was. I have used python along time ago, way before, I was learning Ruby, It just never hook me on to it. However python does actually have alot more libries and usfull stuff, then Ruby actualyl has. So +1 to Python. RE: What language is this? - uber1337 - 02-28-2010 (02-28-2010, 12:09 AM)Wolskie Wrote: And you called us lazy in the other thread becuase we couldn't write 'import random' or what ever it was.Lol it was a joke, hence the after it. I was somewhat jealous of the fact that there is a built in random module, and then when trilo said "that is why Ruby > Python" I realized it was pretty impractical and just showing him python can do the same thing with a simple import statement. I would give Ruby a shot but right now Python is my main priority. RE: What language is this? - Ph4ge - 03-03-2010 (02-20-2010, 09:48 PM)uber1337 Wrote: Not really sure about Ruby but imo Python is the easiest to learn and it has short clear syntax which is just fantastic for sharing/reading snippets. As far as how advanced Python can be when you get into topics such as the internet all I have to say is: Actually, just to point out, it's not 1 line shorter. The ruby script prints say in uppercase once and then prints say (not uppercased) 5 times. Your python code in ruby would be: Code: say = 'I love Ruby' Code: say = 'I love Ruby' RE: What language is this? - Wolskie - 03-04-2010 Nicely pointed out ph4ge. |