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.

Filter by
Sorted by
Tagged with
2 votes
5 answers
1k views

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
  • 493
35 votes
11 answers
13k views

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
3 votes
5 answers
1k views

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
  • 643
1 vote
1 answer
723 views

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
0 votes
1 answer
186 views

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
0 votes
2 answers
318 views

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
  • 101
0 votes
2 answers
772 views

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
  • 846
1 vote
5 answers
846 views

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
0 votes
1 answer
252 views

I have seen information that at least one of reasons why type placed before variable name is that it allows compiler easier evaluate size and type of variable. If so then how (what way) it eases this ...
Ya Y's user avatar
  • 29
0 votes
1 answer
309 views

I'm maintaining a library written in C++, which offers modern-C++ bindings for another API that's C-ish (it's this one, although I'm trying to make this question somewhat more general). Now, when I ...
einpoklum's user avatar
  • 2,808
0 votes
1 answer
758 views

I created a simple parser in Rust and defined the AST like this: enum Expression { Number(i32), BinaryOperator(Box<Expression>, Operator, Box<Expression>), Identifier(String), }...
Iter Ator's user avatar
  • 111
0 votes
0 answers
715 views

The traditional (Scheme, Pascal) way to structure code is this: declare outer function declare inner function body of inner function body of outer function The where clause in Haskell moves ...
ceving's user avatar
  • 401
2 votes
2 answers
515 views

If we program to interfaces various parts of the implementation can be effectively hidden. We can define multiple interfaces for a single implementation and use them as needed, instead of 4 fixed ...
Ondrej Bozek's user avatar
13 votes
8 answers
6k views

I'm recently learning the programming language, and I wonder how compilers work when the language itself does not allow recursion, like how the compiler or the runtime checkers makes sure that there ...
csxyyyyy's user avatar
  • 151
-2 votes
4 answers
274 views

Programming languages traditionally have blocks that specifically cater to controlling iteration. There is the simple while-loop: while (i < 3) {...}; Then there is the more complicated for-loop: ...
Steve's user avatar
  • 12.7k
2 votes
4 answers
921 views

Is it possible in theory to have a programming language that allows for object lifetimes that exist beyond the current scope but without using heap? As a little background, in embedded development it ...
Jeff's user avatar
  • 139
4 votes
3 answers
1k views

I've been trying to better understand (at least at a high level) why the early versions of HTML were designed the way they were. Most of the decisions make sense; I can deduce (at least at a high ...
Mathew Alden's user avatar
1 vote
5 answers
2k views

Short Version If we had an application based on a state machine - transitioning between states to run the application: is repetition, and in fact the entire state machine, based on the presence of an ...
Ian Boyd's user avatar
  • 25.1k
0 votes
1 answer
309 views

I don't know if this is the right place to ask more of a "philosophical" question. The more I code in Java, the more I have to bear with Comparable<T>. And the more I bear with this ...
Thomas Herondale's user avatar
1 vote
2 answers
1k views

Many programming languages have an implementation language (mostly a system language like C) which is used to implement important parts of the core of the language. Besides the libraries are written ...
Student's user avatar
  • 133
3 votes
2 answers
847 views

Given the abstract syntax tree (AST) of each line of a function's code, I am asked to generate code for that function's corresponding unit tests, similar to what Microsoft's IntelliTest tool does here:...
David Johnson's user avatar
2 votes
1 answer
186 views

Does there exist some language whose execution model is implemented as a neuron network, or maybe as some other type of a network/grid (e.g. network of finite automata)? That is, specifically, without ...
Al Berger's user avatar
  • 279
8 votes
2 answers
2k views

I'm very interested in the topic of parsers, especially in the topic of parser combinators like Superpower. The problem with them is that the grammars that they can work with are a bit limited. For ...
SuperJMN's user avatar
  • 453
-2 votes
1 answer
173 views

My project is about an automatic HTML documentation generator. The final product can't be in C# because of some organizational and legal constraints. To my experience, Python is harder to debug than C#...
user366312's user avatar
0 votes
1 answer
396 views

I am trying to build a static program analyzer for a proprietary progamming language for a school project, and am currently trying to implement the parser from scratch. I was wondering, what are the ...
Meowmi's user avatar
  • 101

1
2 3 4 5
29