Skip to main content

All Questions

-3 votes
1 answer
147 views

Learn a framework on a project, or mix languages between backend services [closed]

I am designing my next project, which will do various domain-specific tasks, but all that will be controlled and used via a generic crud web app. I have been professionally using Java with Spring for ...
rafal.sz's user avatar
8 votes
5 answers
10k views

Is code written inline faster than using function calls?

I wrote some script in Python that creates a giant 2D matrix (1000x1000 or bigger) and fills it with random numbers. And after that, it goes through every element of the matrix and changes the number ...
devdevdove's user avatar
3 votes
4 answers
1k views

Do all dynamically typed languages not support function overloading?

I have noticed that JavaScript and PHP and Python do not support function overloading. Do all dynamically typed languages not support function overloading? If the answer is yes, then why is that?
William's user avatar
  • 65
26 votes
6 answers
9k views

What does it mean when you say C++ offers more control compared to languages like Python?

I am comparing C++ with Python. It is clear that C++ is much more efficient and that the C++ code compiles directly to machine code whereas in Python it is interpreted. I do understand that Python is ...
Sourav Goyal's user avatar
-2 votes
3 answers
852 views

is python(cpython) code represented as c code by the interpreter?

what i know is , in cpython when we run a code then its first compiled into byte code and the cpython interpreter( which is written in c interprets it) interprets the byte code and converts it into ...
sagiraju aneesh's user avatar
2 votes
1 answer
1k views

Custom language with mixed markup and Python, parsing in Python

I need a system for creating Python subclasses in a simple manner, and I was thinking of using a (custom) config language similar to json, xml, etc. Here's the initial structure I thought of (one ...
Mahi's user avatar
  • 406
5 votes
1 answer
305 views

In more canonical OO Python situations, what is the rule of thumb for default access modifiers?

Generally speaking in canonical OOP situations, the rule of thumb is to write your classes with the least access as necessary. i.e. only make public only what is necessary, make protected only what is ...
Trevor Boyd Smith's user avatar
-2 votes
1 answer
84 views

Python Syntax Format

Since I am new to programming, I just want to understand the format the built-in functions is represented in the documentations. This is the one from python bytearray ([source[, encoding[,errors]]]) ...
Sagaryal's user avatar
  • 111
4 votes
2 answers
119 views

Is there any good/fundamental reason that Python classvars, and JavaScript prototype inheritance, don't mutate the parent on assignment?

In Python, if you have a classvar, it's accessible from an instance, but if you set the variable on the instance it doesn't actually change the classvar, rather it assigns a new name which shadows the ...
Claudiu's user avatar
  • 789
0 votes
3 answers
1k views

Definition of Generic function

1) Below is a python function summation, that can perform sum of cubes/squares/.., similar operations. def identity(k): return k def cube(k): return pow(k, 3) def square(k): return ...
overexchange's user avatar
  • 2,305
1 vote
4 answers
417 views

Why does string.find("") = 0? [closed]

I'm studying Python and hung up on a simple problem. Let's say we have: string = "hello" When we invoke the find method on the string to find an empty string like this: string.find("") Why does that ...
wolfbagel's user avatar
  • 131
-1 votes
1 answer
181 views

Why do we use 'assert not' in this example?

My code takes 2 dates and finds the age of those dates in days. In my daysBetweenDates method the instructor uses an assert statement: assert not dateIsBefore(year2, month2, day2, year1, month1, day1)...
wolfbagel's user avatar
  • 131
4 votes
2 answers
3k views

What makes a scientific programming language, scientific?

Why are some programming languages such as Python or Julia considered to be "scientific" programming languages? I guess my real question what is the criteria that makes a programming language ...
Dinar's user avatar
  • 149
1 vote
4 answers
3k views

Why use a higher level language? [closed]

A question that gets asked a lot is "Why use low level languages if you can code in high level languages more easily (and often tersely)?". I think the answers are fairly straight forward here, being ...
Daniel Porteous's user avatar
8 votes
1 answer
5k views

How are scripting languages compiled?

I know the term "scripting languages" is just a subset of programming languages, but I want to refer to programming languages such as Python and Ruby among others. First of all, why don't we need a ...
chris's user avatar
  • 251

15 30 50 per page