Questions tagged [language-comparisons]

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

Usage guidance

Questions and answers on Stackoverflow are generally intended to discuss specific features with one or more repeatable and unambiguous solutions.

Consequently, the language-comparisons tag is intended to cover cases where:

  • two or more languages implement the same or substantially similar functionality
  • the functionality comparison is capable of unambiguous identification and resolution
  • such resolution does not require extended discussion or rely solely on subjective personal opinions or personal preference
124 questions
1
vote
0 answers

Algebra-and-topology-related type traits, fundamental functions etc. in C++

The C++ standard library has type traits such as is_arithmetic is_integral and is_floating_point, but complex numbers are arithmetic but you can't, say, compare them to each other, no is_algebraic_number or has_transcendents no is_well_ordered…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

Perl to python shift translation

I am a student learning Python as well as Perl. In our Perl program we used the code my $param = shift; my %local_hash = %$param; when translating Perl to Python what would be the most similar way to 'shift' the hash or do I no longer need this…
Robert
  • 47
  • 1
  • 1
  • 10
1
vote
3 answers

Passing an array for setting variable

I often see this idiom when reading php code: public function __construct($config) { if (array_key_exists('options', $config)) { ... } if (array_key_exists('driver_options', $config)) { ... } } Here I am concern with…
mathk
  • 7,973
  • 6
  • 45
  • 74
1
vote
4 answers

Python features

Is there any article/paper on what features the Python language has to offer? Why should one go with Python instead of any other language? What are the strong and the weak points of Python?
daniels
  • 18,416
  • 31
  • 103
  • 173
1
vote
6 answers

VB.net application in "Real World" software?

I'm curious to know the spread level of programs coded in VB.net. I'm asking, because I coded in VB.net during my university years in aerospace engineering , because our informatics professor wanted us to do that and we learned at least a very basic…
Andreas Hornig
  • 2,439
  • 5
  • 28
  • 36
1
vote
5 answers

language popularity figures (C++, C#, Java, PHP, flash script, etc.)

I need to find figures that show how many programmers world wide, has each of the following languages as their primary programming language. C C++ C# Object-C Java JavaScript VB.NET VB6 (or older) VBA PHP flash scripts Ruby Does anyone know of such…
1
vote
1 answer

what are some cross-language libraries for people who know other languages (similar to phpjs)

PHPJS attempts to port php functions over to javascript. http://phpjs.org/ Rationale: people who know php's functions really well can write javascript and just carry over what they know from php into the javascript world Question: I would like to…
dreftymac
  • 31,404
  • 26
  • 119
  • 182
1
vote
4 answers

How to express this Bash command in pure Python

I have this line in a useful Bash script that I haven't managed to translate into Python, where 'a' is a user-input number of days' worth of files to archive: find ~/podcasts/current -mindepth 2 -mtime '+`a`+' -exec mv {} ~/podcasts/old \; I am…
unmounted
  • 33,530
  • 16
  • 61
  • 61
0
votes
1 answer

Which Java version is the fastest on and is supported by Android?

I heard that Java is becoming faster on newer versions of Android that it's almost as fast as C++, and the performance depends on the type of code/operations. Is this true? If it is, which Java version is the fastest on Android and is supported for…
0
votes
0 answers

Re-writing C++ bit manipulation function in Python

I'm attempting to convert some C++ code that I found online that is used for reordering a bitmap to be used with a specific OLED display for a MIDI controller - Akai Fire. The display uses a strange configuration to display the bits as pixels, as is…
jbflow
  • 578
  • 2
  • 16
0
votes
2 answers

Equivalent of .presence in Python

So, I've been using Ruby on Rails for some time, and I'm wondering if there is something like .presence in Python/Django. Presence returns the receiver if it is present otherwise returns nil. object.presence is equivalent to: object.present? ?…
Anthony
  • 931
  • 1
  • 13
  • 30
0
votes
1 answer

Can you achieve 100% code coverage for groovy?

Groovy being strongly typed dynamic language, is it possible to get 100% code coverage for Groovy? If not, can we get as close as possible to Java for code coverage? Are there any better code coverage tools for Groovy than Java?
0
votes
1 answer

What's the Ruby equivalent of Perl's s{}{}e?

I'm trying to rewrite a command to replace output files with the same files in a different directory, building up a translation map. In Perl I could do something like this: s{(-o|--out)\s((?:\S+\/)?(\S+))}{ "$1 " . ($m{$2}="foo/$3") }eg I'm not…
android.weasel
  • 3,343
  • 1
  • 30
  • 41
0
votes
1 answer

Is there any way to access variable like $var (similar to shell scripting) in python?

Hi I'm new to python programming. I want to copy a file from source to destination. I'm using shutil.copy2(src,dst). But in src and dst path , I want to use variable. For example (variable name): pkg_name = XYZ_1000 so src path will be :…
deepu
  • 147
  • 2
  • 12
0
votes
1 answer

String formatting in a python dictionary like Ruby

In Ruby, you can do something like: a = 4 b = 5 match = {} match["#{a}-#{b}"] = 0 Then, if i say: match["4-5"] The result is 0. Can I do something similar in a python dictionary? I can't seem to get string formatting to work with a…
ab15
  • 353
  • 1
  • 2
  • 11
1 2 3
8
9