Questions tagged [language-design]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
58 views

Variable argument placement in methods

Imagine that we have a base class number that has implemented a integer and floats, but not complex numbers and that we would like to extend it to also support ...
Sylwester's user avatar
  • 119
0 votes
2 answers
349 views

Can String be a subtype of Character in a programming language?

Could a programming language be designed so that there is an inheritance relationship between string and character (both of ...
tpm900's user avatar
  • 365
0 votes
1 answer
72 views

Can contiguous arrays be lazily evaluated?

Contiguous arrays with variable length, such as C++'s std::vector, have been a major sequential container for languages whose evaluation is eager. However, it has ...
Dannyu NDos's user avatar
0 votes
2 answers
48 views

Types and programming languages: strange term construction?

Pierce's Types and Programming Languages has the following definition of terms: $$S_0=\emptyset$$ $$S_{i+1} = \{true,false,0\} \cup \{succ(t), pred(t),iszero(t)|t \in S_i\} \cup\{if(t_1)then (t_2)...
Hank Igoe's user avatar
  • 179
0 votes
1 answer
133 views

Are there any languages without tokens?

I know a lot of computer languages and they all use tokens. E.g. in very early BASIC you could say LET answer = 42, which is composed of seven tokens, ...
CJ Dennis's user avatar
  • 101
0 votes
1 answer
31 views

What name is used in the literature for an interpreter or compiler which compiles and executes all function calls which have constant literal inputs?

In the following discussion, we use the term old programming language to refer to programming languages which had their first release prior to the year 1990. In old programming languages, there was a ...
Toothpick Anemone's user avatar
0 votes
1 answer
84 views

How to do asynchronous programming with only global variables?

If a programming language only supports global variables, is it still possible to use asynchronicity, like callbacks, event-driven programming, other kinds of parallelisation? How can it be done?
minseong's user avatar
  • 161
0 votes
1 answer
163 views

Why in Declarative Programming variables are not reassigned?

I've read that a Declarative language is called "stateless". This means that we can imagine that internally every variable is a constant variable, and it never get reassigned ( in contrast with what ...
Jhdoe's user avatar
  • 133
0 votes
1 answer
45 views

extend ECMAScript by adding new keywords and syntax

I would like to extend ECMAScript by adding new keywords and syntax to it, for example: |variableName| stipulates a special kind of variable which I would like to be able to include in a normal ...
oskar132's user avatar
  • 103
0 votes
1 answer
339 views

The ultimate virtual machine

It seems to me that one way computer science could be divided up, is into three domains: What is efficient for humans to represent and comprehend What is efficient for computers to represent and ...
sfultong's user avatar
0 votes
3 answers
162 views

In data structures, there are many identifiable characteristics, but what are the characteristics are of primitive-data types?

Data Structure a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data ...
cozycoder's user avatar
  • 123
0 votes
1 answer
80 views

A systematic approach to creating a simple test parser

I need to create a simple text parser that replaces {tokens} with text from a table. The more complicated bit is the {?text?} ...
martixy's user avatar
  • 103
0 votes
0 answers
32 views

How can fuzzy logic be applied to computer language design?

Is fuzzy logic in any way applicable to general-purpose language design? If yes, then how would a computer language theoretically benefit from first order support of fuzzy logic?
Aria's user avatar
  • 101
0 votes
0 answers
33 views

How to design context-free grammars generating the languages with twice as many a’s as b’s? [duplicate]

The problem is designing context-free grammars generating the following languages. The set of strings over the alphabet Σ = {a, b} with twice as many a’s as b’s. I found a solution but I don't know ...
Mark's user avatar
  • 1
0 votes
0 answers
24 views

procedures and immutable data to simulate return values

Let's say I have a programming language that allows procedures, i.e., methods without return values, and immutable data-structures, so no sideeffecting inside a procedure. Is it possible to simulate a ...
Wickoo's user avatar
  • 196
0 votes
0 answers
219 views

Recursive macros and termination of assembler

A debate has arisen in the course of using an assembler (which does a bit of preprocessing first, but is mainly a static assembler): This particular assembler allows recursive macros to be defined, ...
lol's user avatar
  • 101
0 votes
0 answers
377 views

How to generate intermediate code in more than 1 pass in compiler design?

I'm taking a compiler-design class where we have to implement our own compiler (using flex and bison). In dragon book by V.Aho et al. They have mentioned backpatching to backpatch forward references ...
sonus21's user avatar
  • 97
-1 votes
1 answer
64 views

How is a procedure application a control structure?

In scheme, a procedure application is considered as a control structure. Why is this?
user49263's user avatar
-3 votes
1 answer
69 views

A chatbot's take on dynamic scoping: it is easier to debug - correct?

I asked the chatbot at you.com, "what is an advantage of dynamic scoping?" and it said the following on the pane titled YouChat. (If you click the link, you will probably see a different ...
Hank Igoe's user avatar
  • 179

1
2