Questions tagged [programming-languages]

Questions related to design, implementation, and analysis of programming languages. NOT for questions about how to program, which are off-topic on this site.

Filter by
Sorted by
Tagged with
0 votes
0 answers
40 views

What are optimizations that can be made after the type checker has completed?

So I am implementing a statically typed version of solidity. I have a type checker built. I am working on User defined aliases currently. ...
user avatar
0 votes
0 answers
52 views

What are Funges?

I am currently reading up about esoteric programming languages and came across a COS theory question stated as follows: Esoteric programming languages can be categorised in a variety of different ...
user avatar
  • 1
-1 votes
0 answers
31 views

What is an expression language?

Recently I came across with the package manager Nix. According to wiki: It is also the name of the tool's programming language. As I understand there is a programming language called Nix. But, ...
user avatar
  • 209
-3 votes
0 answers
14 views

Where there is a place my requirement of summarize the program design executed ways?

Summarize the way the high level language program(eg. Java) is executed, I know there are below executed ways to design a program: ...
user avatar
0 votes
0 answers
55 views

Question about complexity of two topics in programming language theory

I am a student who is currently finishing second year of university mathematics. This summer I have to choose a topic for my diploma. Because I am particularly interested in computer science I am ...
user avatar
0 votes
2 answers
53 views

Why is there a difference between the meaning of the word 'statement' in programming and linguistics?

In linguistics, the word 'statement' means something that is true or false, closer to a declarative sentence, but in programming, the meaning is closer to an imperative sentence. What is the reason ...
user avatar
2 votes
0 answers
50 views

What are strong examples of programming languages whose type systems don't embed into their native type theory?

Given a typical popular programming language, its native type theory is a dependent type theory which describes invariants, preconditions, predicates, and other generalizations of typical type-system ...
user avatar
  • 211
1 vote
1 answer
92 views

What exactly does Turing Equivalence mean?

Assume I have a programming language $L$ with well-defined semantics. Showing Turing-completeness is straightforward: if I write a program using $L$ simulating the universal TM, I'm done. What I'm ...
user avatar
  • 227
0 votes
0 answers
20 views

resources about programming language theory,topics: zipper and monads

I am in need of exercises and solutions about these topics in programming language theory with ocaml, zippers and monads, I can't find much on google, or I am missing something?
user avatar
7 votes
1 answer
637 views

What exactly is the relation between Haskell and category theory?

In articles or Quora posts about category theory, I often find mentions of the programming language Haskell. I have little knowledge of category theory and even less of programming. Could someone ...
user avatar
0 votes
1 answer
41 views

Structural induction proof for reverse(push(as, bs)) = push(reverse(bs), reverse(as))

I need to prove: reverse(push(as,bs)) = push(reverse(bs), reverse(as)) where: ...
user avatar
3 votes
2 answers
232 views

Similarities and differences between Unit and Bottom types?

I came across this recent Reddit thread, Thoughts on Botton vs Unit Types, but I don't understand what the similarities and differences are in regards to when you are creating a programming language. ...
user avatar
  • 1,911
1 vote
0 answers
53 views

First piece of code in scientific papers

What is the first/oldest piece of source code shown in an scientific paper or journal? I am looking for source code of assembly or a high level programming language which was real (implemented) and ...
user avatar
4 votes
1 answer
54 views

Covariance and Contravariance: Conflict without a Cause

Here is the last paragraph at page 441 of the paper ‘Covariance and Contravariance: Conflict without a Cause’ by Giuseppe Castagna: How is all this translated into object-oriented type systems? ...
user avatar
  • 113
2 votes
2 answers
81 views

What does Herb Sutter refer to in his seminal paper The free lunch is over?

In his paper The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software, Herb Sutter writes: The mainstream state of the art revolves around lock-based programming, which is subtle and ...
user avatar
  • 325
0 votes
1 answer
15 views

Find the output value using call by value and call by reference

Given the following code: int p = 5 , q=2; int f( int b, int c){ b = 2 * c; c = 3 + p; return b + c ;} print f(p,q); print p; print q; I have found that the output values using call by value are: f(p,...
user avatar
  • 13
0 votes
1 answer
52 views

What is an API, exactly

I’ve read the Wikipedia article and know it’s basic function but I don’t understand what it physically is. Like, is an api a text file that the main program reads from and you are just putting your ...
user avatar
1 vote
1 answer
86 views

What is the definition of a redex and what are they for in programming languages literature?

I saw the word "redex" in the context of proramming language theory/semantics in 2018 and now when I was reading a neurosymbolic research paper (machine learning with neural nets + symbolic ...
user avatar
0 votes
1 answer
36 views

Partially correct?Totally correct?Deterministic?Determined?Terminating? What do these adjectives mean for an algorithm?

These terms are often used to describe algorithms but I'm not really sure what they mean. I would like to see more examples of what each one is like and how they can be identified. Can anyone please ...
user avatar
0 votes
1 answer
158 views

How to incorporate Duplicate Letter Handling for Wordle?

I am trying to reverse engineer the following image. So far, the way I would take into account of duplicate letter handling is the following . I am unsure how I could code this such that the ...
user avatar
1 vote
0 answers
32 views

Are there any algorithms that become much easier to design & implement in reversible computation settings?

If your program can move backwards (even if just for a preset amount like 10,000 atomic steps), then it's easier to do these things: Undo/Redo history (automatically for everything). This can be a ...
user avatar
1 vote
2 answers
110 views

What are the technical reasons programs in C and C++ do not show runtime errors, but programs in Rust and Golang do?

When a runtime error occurs with a program in language likes C or C++ using GCC/G++, it just crashes the process. When it occurs with a program in language like Rust or Golang, a detailed error ...
user avatar
0 votes
0 answers
35 views

Interpretation of semantics of queue algebra

I am trying to understand the semantics for stack algebra and queue algebra as introduced in section 8.5, "Specification Algebras" of textbook Software Engineering 1, Abstraction and ...
user avatar
  • 459
-1 votes
2 answers
81 views

In Programming data types size are depends upon what?

In Programming there is different data types (int , cahr , bool , float ) and they have different sizes (1,2,4,8 .. Bytes) , and the size of data type are depends upon hardware or architecture of ...
user avatar
  • 1
1 vote
1 answer
55 views

What exactly are functions in programming?

Are conditional statements, loops, and basic maths operators are functions? I learn functions as a "specific action". But, I saw in a video from youtube that a guy called loops and math ...
user avatar
1 vote
1 answer
24 views

Books for learning horn clause logic

I want to learn prolog,two reason for that are -one can always find a counter example to the argument by searching for negation.So,one can learn by debugging the scripts.I heard that prolog is based ...
user avatar
2 votes
1 answer
119 views

is HaltingFuck computable?

A while ago I defined the language HaltingFuck, but I've never been able to figure out its computational class. The language is defined as follows: HaltingFuck is a language very much like Brainfuck, ...
user avatar
  • 375
1 vote
0 answers
39 views

Is try...catch a control flow pattern?

Is try...catch a control flow pattern such as if-than-else-elseif or ...
user avatar
  • 11
-1 votes
3 answers
392 views

What is a pseudocode of try-catch?

What is a pseudocode of try-catch? Is it this? **Try** SOMETHING If you succeed Do nothing special Else, if you didn't succeed Do what's described in the **Catch** block Anyway, either if ...
user avatar
  • 11
3 votes
1 answer
40 views

What is a program analysis technique for tracing assignments (mutations)?

I am looking to write a program analysis for Java programs that tracks assignments and is able to discern: whether a class field (static or not) is read and where the read originated whether a class ...
user avatar
0 votes
0 answers
24 views

What exactly is "compositional desugaring"?

I've been reading Pombrio and Krishnamurthi's Hygienic Resugaring of Compositional Desugaring and I don't fully understand what they mean by "compositional desugaring". For example, they ...
user avatar
2 votes
0 answers
58 views

Named outputs of a function

Is there a programming language with named return values? I imagine something like in the following (syntax to be workshopped): ...
user avatar
  • 129
2 votes
0 answers
88 views

What is the runtime (time complexity) of Type Inference in Simply Typed Lambda Calculus?

I was told that the runtime of OCAML or Scala is EXPTIME - which seems really bad! However, since people use type inference (deciding the type of a term or program or expression) in practice - it must ...
user avatar
0 votes
1 answer
54 views

kolmogorov complexity for finite Language?

In lectures my professor proved that there is no Turing machine that for every x it calculates k(x). On the other hand, I saw a claim online that for finite language L there is a Turing machine that ...
user avatar
  • 51
10 votes
4 answers
4k views

What are some interesting/important Programming Language Concepts I could teach myself in the coming semester?

I’m a CS senior with and Individual Study period this coming semester, and I’ve decided I’d like to learn more about Programming Language Concepts. More specifically, different programming paradigms, ...
user avatar
  • 119
1 vote
2 answers
83 views

How was swapping program born?

Code: a=10 b=5 temp=a a=b b=temp I am studying Python and I stumbled upon the classic program: The Swapping Program. It is simple: ...
user avatar
  • 13
1 vote
0 answers
31 views

Shallow Binding with static scope, is it possible?

I'm new in programming, I'm currently studying programming languages. I'm trying to implement Shallow Binding with static scope, starting from an abstract syntax (producing a programming language ...
user avatar
0 votes
1 answer
39 views

Which type can cause problems with encapsulation in Java?

Out of the following, which type can cause problems with encapsulation? A. Int B. Int[] C. String D. non of the above I chose D and was incorrect. I am kind of confused what this questions is asking ...
user avatar
0 votes
1 answer
33 views

Grammar where the precedence of condition operators are asymmetric with regard to assignment operators

In Unix shell programming, there's the ideom: program1 && program2 && program3 where successful completion of ...
user avatar
  • 151
1 vote
1 answer
59 views

When is a stuck state not final and when is a maximal sequence not complete in transition systems?

Reading the book Practical Foundations for Programming Language. In section 5.1 Transition Systems, the author said that Whereas all final states are, by convention, stuck, there may be stuck states ...
user avatar
  • 247
2 votes
0 answers
19 views

History of the category of effectful computations

The 1971 paper A Catalog of Optimizing Transformations contains this passage: irreducible subprograms require special handling. (An irreducible subprogram is one which maintains a history, performs I/...
user avatar
  • 41
2 votes
2 answers
91 views

Semantics and implementation of side effects

From a practical point of view, how do functional languages with formally specified semantics (like ML) handle side effects like printing? I'm aware of things like the IO monad in Haskell but I'm ...
user avatar
3 votes
4 answers
211 views

Are there any programming languages that support state machines in their standard library?

State machines are a fundamental computer science concept and in many senarios they are the simplest way to implement a process or program. However, most programming languages don't support them ...
user avatar
  • 131
2 votes
1 answer
50 views

What is the practical difference between "differentiable programming" and existing autograd libaries?

People have recently started talking about "differentiable programming". I have listened to some people talk about this at a philosophical level, but I don't see the practical difference ...
user avatar
  • 3,314
1 vote
2 answers
65 views

Is there any programming language focused on atemporality?

It seems like a lot of programming is about converting a high-level human intuition into a very precise, ordered set of steps and conditions for the computer to execute correctly. I think programming ...
user avatar
8 votes
2 answers
138 views

Does the concept of "side-effect" predate functional programming?

When I was reviewing a book, I saw that there's a sentence claiming "side effect is a term coming from the domain of functional programming". I would think that the concept existed before ...
user avatar
1 vote
1 answer
85 views

How does the Go language implements maps?

To what extent is the MAP data type implementation language dependant??? If we know that C++ implements maps as Red Black Trees, unordered maps as hash tables, How C++ and alike maps are actually ...
user avatar
  • 140
1 vote
0 answers
65 views

Complex structs in Rust, when following ownership rules

Background I recently started learning the rust programming language. Suppose you want to create some complex struct, for example - a graph. I can see two possible ...
user avatar
  • 10.9k
-2 votes
1 answer
47 views

What is the reason for this contradiction about the size of the char type?

the size of one char in C is 4 bytes, however to define an 'A' character we use the sum of two values like this expression here: or in other way i want to say that the char is 4 bytes size, but in ...
user avatar
0 votes
5 answers
143 views

Are there programming languages where you import only what you need?

If all programming languages more or less compile down to the same machine code. Have there been attempts at, or is there a "field" around the concept of even more modular programming ...
user avatar
  • 1

1
2 3 4 5
19