Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My boss was looking down on me about learning Ruby because "It's just a PHP generator" which I can't find anything about it being so. Is this the case?

I understand that the Rails framework can be used to generate PHP code, but isn't Ruby in-and-of-itself its own programming language?

share|improve this question

closed as not a real question by Mark Trapp Sep 28 '11 at 17:22

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Rails generates PHP code? Really? I wouldn't know, I'm not even a Ruby guy, much less a Rails guy, but it seems completely pointless and way too complicated (both to do and to get right). – delnan Sep 28 '11 at 15:46
Perl influenced both PHP and Ruby, other than that, I don't see the two being related outside of similar problem domains. – World Engineer Sep 28 '11 at 16:55
I sympathize with your plight there, but this seems like a question that could've been answered with just a little bit of research. This feels off-topic to me for this site. – Adam Lear Sep 28 '11 at 16:58
I'm sorry, but really? The Wikipedia article in particular seems to be fairly comprehensive and proves that Ruby is its own language. – Adam Lear Sep 28 '11 at 17:00
@AnnaLear: I get that it's a softball question, but it isn't that hard for us to answer with a yes or no including a link for more info. At least some thoughtful responders got in before the question was slapped down. – Steve Evers Sep 28 '11 at 17:33

Dilbert's principle in action.

No, ruby isn't a PHP generator. It is a language that has nothing to do with PHP except some usages.

share|improve this answer
LOL i have a funnier addition for you: she's the owner and CEO o.0 – Mechaflash Sep 28 '11 at 15:47
The higher up they are, the more Dilbert's principle applies. – Robert Harvey Sep 28 '11 at 15:50
+1 for the Dilbert Principle – Matthew Flynn Sep 28 '11 at 15:50
@mechaflash let me guess: it's a small shop, and it pretends to be a corporate-thingie. – ZJR Sep 28 '11 at 15:59

Ruby is a full-fledged language.

As far as the statement made by your boss is concerned, if Ruby is "just a PHP generator," then so is C, Java, C#, Clojure, etc.

Ruby is a good language because it you can express things in the Functional Paradigm (for example, Ruby has lambdas).

Learn Ruby. It will change how you see problems.:)

share|improve this answer
PHP now have lambda and closure. In a far futur, his boos may be right ! We are all DOOOOOOMED ! – deadalnix Sep 28 '11 at 16:03
I wasn't aware that PHP had closures or lamdbas. Thanks for the tip.:) – David Sep 28 '11 at 16:13
It is new in PHP5.3 . PHP didn't had this feature before. – deadalnix Sep 28 '11 at 16:23

Yes. Ruby is in-and-of-itself its own programming language

Ruby is...

A dynamic, open source programming language with a focus on simplicity and productivity.

share|improve this answer

I understand that the Rails framework can be used to generate PHP code

That's not generally true. I suppose somebody somewhere may have made this happen, but their mental health problems would not be insignificant.

In general, Rails applications are written in a mixture of languages underpinned by Ruby, the others including HTML, CSS, Javascript. While HTML may be replaced by, for example, HAML, and Javascript (recently) by Coffeescript, with compilation steps occurring as needed, I've never seen Ruby being "compiled" down to PHP.

Ruby and PHP both appeared at about the same time, according to Wikipedia (here and here). Ruby was a fairly general-purpose scripting language that erupted into the Web World with the advent of Rails in 2004, whereas AFAIK, PHP was designed for web development.

share|improve this answer
Someone actually did make this (well, Ruby to PHP, anyway) happen. Fructose generator: – cczona Sep 28 '11 at 18:06

One point nobody has mentioned - if Ruby were a PHP generator (spoiler alert - it's not), who cares? C is "just an assembly generator", so I guess we should look down on people who learn C.

share|improve this answer
The sad thing is that people used to do that for a long time. – delnan Sep 28 '11 at 17:24
I guess the differentiatior here is that (at least, to me) ruby and php occupy a space on the same level of abstraction from the machine, which would be redundant. – Steve Evers Sep 28 '11 at 17:30
@SnOrfus - I think we should all have a think about CoffeeScript now. ;) – Slomojo Sep 29 '11 at 2:49
nonsense, my processor runs C directly! – Jimmy Hoffa Feb 22 '13 at 20:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.