Skip to main content

Questions tagged [programming-languages]

Artificial languages for instructing computers to do steps of computation in order to complete tasks. They allow programmers to communicate with computers.

2votes
3answers
786views

Why don't languages auto import everything based on namespace?

This is basically a continuation of "Why don't languages auto import everything?" but with a slightly altered premisse: Say we have a language like C++ / python that uses namespaces to ...
glades's user avatar
12votes
7answers
4kviews

Immutability across programming languages

I'm quite confused about the concept of mutability (or mutation?), especially across different languages. In a language like Python: x = 10 x = 20 I believe this is called shadowing (or rebinding) ...
Ghassen's user avatar
35votes
10answers
12kviews

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

As developers, we often face the challenge of balancing meaningful variable names with code readability. Long, descriptive names can make code harder to read, while short names may lack context. For ...
Shardul Vikram Singh's user avatar
0votes
3answers
303views

Number of lines of code executed per line of code: Are there significant differences per language? [closed]

Having fewer lines of code per feature is typically better as it increases the developer productivity. Did anyone ever measure the number of code lines executions per line of code across multiple ...
Sebastian Wagner's user avatar
3votes
5answers
992views

How are strings simultaneously objects and primitive data types in C#?

In C#, strings can be used like objects with methods, properties, and other features of objects. At the same time, strings are treated the same as primitive data types like int or float in numerous ...
Bunabyte's user avatar
-3votes
1answer
147views

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
1vote
1answer
576views

Tagged pointers vs. fat pointers

I'm writing my own dynamic programming language. So far I've been using a tagged union for all values. Since this boxes primitive types needlessly, I've begun researching tagged pointers which seem to ...
Matheus Moreira's user avatar
0votes
1answer
489views

How do function inlining and Tail Call Optimization affect call stack?

I've just accidentally came across this answer about inlined functions and I'd like to know how this affects call stack. But I can't add comments because I don't have enough rep so I decided to ask ...
b3rry's user avatar
0votes
1answer
163views

Bytecode format and loading in language VMs

I am thinking about how to build a language VM. I have been able to get some of the basic constructs right, including jumps to functions within the chunk of bytecode that is currently loaded. But now ...
mydoghasworms's user avatar
4votes
1answer
333views

What is the problem with whitespace in C that Ruby allegedly repeated?

I'm reading the book The Secret Life of Programs by Jonathan E. Steinhart. In it, he mentions in passing: many consider the handling of whitespace in Ruby to be a replay of of a mistake in the ...
tsvallender's user avatar
0votes
2answers
292views

Advantage of implicit/explicit declaration of global symbols (like functions)

In C and C++ we need to declare a function before its usage, if its definition comes after where it is called. (Well, there is also the "implicit declaration" rule in C, but it is rarely ...
Ma Joad's user avatar
4votes
3answers
852views

Is there a programming language other than Java, C#, and Go which includes null with its static object types?

I was reading the excellent book by Axel Raushmayer, Tackling TypeScript. In this section of Chapter 7, the author makes the interesting claim In many programming languages, null is part of all ...
Ray Toal's user avatar
0votes
2answers
631views

Is there a language agnostic interface for programming language interop?

There are many packages for creating bindings of a library that's written in one language to be called from another language. Some programming languages also include such interop in the standard ...
danijar's user avatar
1vote
1answer
630views

Languages with PHP-like traits?

PHP have what it calls "traits" which despite the name is not like traits in Rust, Scala or other languages. In many other languages with support for traits, a trait create a is-a relation. ...
Fred's user avatar
  • 509
1vote
5answers
752views

Why don't languages auto import everything?

Why is there a such thing as import in programming languages? If a package does not exist, then trying to import it would cause an error anyway. So why don't languages just auto import ALL available ...
user1345541's user avatar

153050per page
close