Top "Language-comparisons" questions

Questions comparing two or more programming or markup languages against each other.

Does PHP have an equivalent to Python's list comprehension syntax?

Python has syntactically sweet list comprehensions: S = [x**2 for x in range(10)] print S; [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] In PHP I would need to …

php arrays list-comprehension higher-order-functions language-comparisons
How to pass two parameter values to couchdb views?

I want to reproduce this SQL in CouchDB views. SELECT name,department FROM Persons where id = ? and group_id = ? ; How …

sql couchdb language-comparisons
Is there a Python equivalent to Ruby symbols?

Is there a Python equivalent to Ruby symbols? If so then what is it? If not then are we stuck …

python ruby dictionary symbols language-comparisons
Is Grails (now) worth it?

I know this is a duplicate, however, the Grails world has moved on considerably since that question was asked more …

ruby-on-rails grails groovy language-comparisons
What is the equivalent of a Python docstring in Ruby?

In Python, you can access an object's docstring by using obj.__doc__. What is the equivalent action in Ruby?

python ruby-on-rails ruby documentation language-comparisons
Groovy advantages over Jython or Jruby?

Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent …

groovy jruby jython jvm-languages language-comparisons
Templating library in node.js similar to Jinja2 in Python?

What would be a node.js templating library that is similar to Jinja2 in Python?

python node.js jinja2 language-comparisons
Python equivalent of Ruby's expression: "puts x += value"

For curiosity's sake... In Ruby: =>$ irb 1.8.7 :001 > puts x = 2 2 => nil 1.8.7 :002 > puts x += 2 while x < 40 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 It's quite …

python ruby language-comparisons
Jinja-like JS templating language

I really like django/jinja2 templating languages. Their syntax is extremely simple and yet is highly versatile. Is there anything …

javascript jquery jinja2 template-engine language-comparisons
Does Java have a default copy constructor (like in C++)?

Does Java has a default copy constructor as C++? If it has one - does it remain usable if I …

java c++ copy-constructor language-comparisons object-construction