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
-1 votes
0 answers
83 views

What is the name and/or type of this language? [closed]

This is an exact replica of a previously asked question, but with a different language. Hopefully that makes it okay. This runs on a robotic welder and looks like some kind of assembly, but I could be ...
user avatar
  • 107
1 vote
3 answers
343 views

Why does HTML collapse whitespace?

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 ...
user avatar
0 votes
0 answers
50 views

What is it about kdb/q that makes the grammar not suitable for ANTLR style parser generators?

I want to build a code analysis tool for personal use when programming in kdb/q. In order to do this, I need to be able to parse q code into an AST. I have never written a parser before. ANTLR4 seems ...
user avatar
1 vote
5 answers
258 views

Do state machine based programs have a processing loop - or even exist?

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 ...
user avatar
  • 23.7k
3 votes
2 answers
314 views

Moderate discussion on choice of programming language

Assume you have a small set of suitable programming languages (e.g., Python, C++, Julia), a clearly defined task (development of software services in the context of computational sciences), and a team ...
user avatar
  • 165
0 votes
1 answer
136 views

Excessively verbose and cryptic comparisons in Java

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 ...
user avatar
-1 votes
2 answers
206 views

Why do most AST trees use classes instead of vectors

I've noticed that most AST tree implementations use classes for nodes instead of something like a vector. I want to ask, why do most people use classes? Are there issues to using vectors to make AST ...
user avatar
1 vote
2 answers
219 views

Implementing libraries for a programming language

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 ...
user avatar
  • 133
0 votes
2 answers
167 views

Do lexers have to go word by word or can they go line by line

So I'm trying to write a interpreter with a lexer. Currently, it adds a token line by line and does some more processing later on. But when I look at sources online, they all seem to go word by word ...
user avatar
1 vote
2 answers
151 views

Is there a simple algorithm for generating unit tests given a function's code? [closed]

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:...
user avatar
0 votes
3 answers
313 views

Is it possible to make a compiler for any dynamic/script/interpreter language

Logically, not based on how cost we will spend or how much we will hire programmers to do it. Can we (Is it possible to) make a compiler for any dynamic/script/interpreter language, like Lua, Python, ...
user avatar
2 votes
1 answer
162 views

Is there a language implemented as a neuron network?

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 ...
user avatar
  • 269
2 votes
1 answer
81 views

Hot reloading anonymous functions in a custom scripting language

I am implementing anonymous functions (lambdas) in a scripting language that supports hot reloading. The language currently supports passing user defined functions (pointers) to plugin functions which ...
user avatar
1 vote
1 answer
377 views

How does the GLL parsing algorithm work?

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 ...
user avatar
  • 383
2 votes
4 answers
539 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?
user avatar
  • 55
-2 votes
1 answer
138 views

Is it a good idea to implement a software application in C# and then convert it to Python? [closed]

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#...
user avatar
0 votes
2 answers
149 views

Technology choice reasoning

I am tasked with making a program that will roughly have the same steps as a program that a former has written. The program that I'm trying to imitate doesn't seem to be open for extension, otherwise ...
user avatar
0 votes
1 answer
106 views

Benefits of using a tokenizer/lexer before parsing for recusive descent parser

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 ...
user avatar
  • 101
13 votes
5 answers
2k views

How can I simulate a "negative" type system?

In my experience, all languages I know have a sort of "positive" type system. What I mean by "positive type system" is that when you are writing the source code, you always specify ...
user avatar
4 votes
5 answers
2k views

Why don't languages like C have NAND operators?

I know that some golfing languages like APL have a dedicated NAND operator, but I'm thinking about languages like C, C++, Java, Rust, Go, Swift, Kotlin, even instruction sets, etc. since these are the ...
user avatar
  • 466
0 votes
2 answers
107 views

How are futures and speculations evaluated differently?

In Practical Foundation of Programming Languages 38 Futures and Speculations A future is a computation that is performed before it is value is needed. Like a suspension, a future represents a value ...
user avatar
  • 5,271
0 votes
1 answer
137 views

How can I tell if a library's execution model is the same as or different from the execution model of its base language?

https://en.wikipedia.org/wiki/Execution_model says A programming language consists of a grammar/syntax plus an execution model. The execution model specifies the behavior of elements of the language. ...
user avatar
  • 5,271
-1 votes
3 answers
392 views

Why are constants declared with `let`?

A few weeks ago, I went on Udemy course on Swift, the instructor mentioned that constants are called let in Swift because it's standard in OOP (JavaScript uses it for example). I know this may seem ...
user avatar
1 vote
1 answer
82 views

How to manage versioning for changes that only affect some pieces of a package?

I'm designing a new language and the package-management system for it (something like NPM, Cargo, Pip, Gem, Cpan, Cabal, NuGet or the like). I'm trying to decide what's a good way to handle the ...
user avatar
-8 votes
1 answer
105 views

Are the stone-dead PHP mailing lists really how PHP developers and the PHP community communicate? [closed]

I've been looking at this for a long time: https://news-web.php.net/ Almost every single mailing list has the last messages sent to them in the year 2000-2003. That's 17-20 years ago! It would be an ...
user avatar
3 votes
1 answer
107 views

Choosing the design of a scientific DSL: purely or impurely functional?

My aim is to create a language specific to the scientific field (which would be used mainly in the field of machine learning and physics) which would be based on the functional paradigm, a paradigm ...
user avatar
  • 219
2 votes
2 answers
152 views

Why do some languages decouple operations from data type?

This is a pretty difficult question to frame. But I'll try my best. In some languages, data types are decoupled from the operations they can perform, while in other languages like JavaScript they are ...
user avatar
  • 147
0 votes
2 answers
168 views

Name for a "called function"

I am writing a documentation for a programm where a function is defined and it is called three times. I call the definition of the function "function definition". But what is the correct ...
user avatar
26 votes
6 answers
8k 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 ...
user avatar
1 vote
3 answers
1k views

What are programming languages written in?

This is my first question so be nice lol... Think of it this way. Python is written in C, which is written in an older C compiler, which is written in an even older C compiler, which is written in B, ...
user avatar
  • 135
-3 votes
3 answers
419 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 ...
user avatar
1 vote
1 answer
77 views

How do covariant parameterized types nested inside invariant parameterized types act?

Here is a concrete example of what I'm asking about: MutableList[ImmutableList[Object]] Where ImmutableList is covariant wrt its first parameter, but MutableList is invariant wrt its first parameter. ...
user avatar
-4 votes
1 answer
134 views

How do they make programs so lightweight?

I was checking out a sample project of NetBeans IDE called "Stopwatch". Then ran it! Then I opened TaskManager to see how much RAM it uses. It was using ~110MB. Then I opened the "...
user avatar
  • 95
-3 votes
1 answer
753 views

What naming convention should I use for a JSON RPC client API designed for multiple languages?

This is the documentation with the original RPC client API specification. The naming convention in the specification is camel case. Naming conventions might differ in subtle ways for different ...
user avatar
  • 103
5 votes
1 answer
207 views

Real-world scenarios for protected inheritance

C++ supports protected inheritance: A class can derive from a base class B in a way that the "outside" world doesn't see that class "as a B" but the class itself and it's derived ...
user avatar
55 votes
10 answers
10k views

If null is a billion dollar mistake, what is the solution to represent a non-initialized object?

This comes with a debate with my colleague that I'm using null as an object initial state. type Value = Node | null const [value, setValue] = React.useState<Value>(null) function test(v: Value) ...
user avatar
  • 529
1 vote
2 answers
258 views

Is there a statically typed programming language that implements Polymorphism without using a superclass or an interface?

Is there a statically typed programming language that implements Polymorphism without using a superclass or an interface (if such implementation is even possible)?
user avatar
  • 119
2 votes
4 answers
210 views

A language design with variable qualifier

I am planning to design a programming language. One challenge I face with is whether it is a good idea to have const as a variable qualifier instead of a type qualifier. For example in C++: const int ...
user avatar
  • 29
3 votes
2 answers
1k views

Programming a library in multiple languages

I am planning to implement a cryptographic library for several languages and looking for best practices. I have looked at several threads, especially this, this, and this one, which answer my ...
user avatar
-2 votes
1 answer
79 views

An expression in the first line of the control flow statement

Is there a term or some short wording to refer to an expression in the "first" line of the control flow statement? func() { if (a == b) { var = 1 + 1 return True } else { var ...
user avatar
9 votes
3 answers
395 views

Being great in one language when you need to know many?

My job requires me to know how to work with Ruby, Python, Bash, Puppet, Golang, MySQL and occasionally Scala and PHP. Yes I really do have projects including most of these and there are weeks where I ...
user avatar
  • 199
2 votes
4 answers
276 views

What prevented compiled languages from being adopted on the web originally, as opposed to JavaScript?

Since my previous question was closed (https://stackoverflow.com/q/62354455/1173166), I thought this would be a better place to ask the question. Original: JavaScript we designed specifically for ...
user avatar
  • 153
-5 votes
1 answer
419 views

In what programming language is Python's regex module written in? [closed]

If I try to rewrite specific regex functionalities (e.g. substituting a string) in Python, a solution using the regex module is always faster. Is regex written in C?
user avatar
  • 93
-2 votes
2 answers
289 views

Conditional jump statements in middle- and high-level languages

In Java, C, and C++ we have the following jump statements: break, continue, goto, and return. In C#, there is also throw. I'm not really familiar with either of these languages. This is simply what I ...
user avatar
2 votes
3 answers
275 views

Is "early binding" the same as "static dispatch", and "late binding" the same as "dynamic dispatch"?

I often see the terms "early binding" and "static dispatch" used interchangeably, and I also often see the terms "late binding" and "dynamic dispatch" used interchangeably. Do these terms mean the ...
user avatar
18 votes
4 answers
4k views

What do IDEs use to do code completion suggestions?

For example if I have a class like class Foo { public int bar; public Foo(int constructor_var) { bar = construction_var; } public bar_plus_one() { return bar++; }...
user avatar
  • 327
3 votes
2 answers
95 views

How do language implementations implement native-extension class instantiation?

I'm writing a language interpreter in C. I'm currently implementing a system that allows writing extension modules in C for the interpreter. These modules are loaded into a code file like a normal ...
user avatar
  • 20.7k
-5 votes
1 answer
124 views

How I can make multi language program?

I'm new in programming I knew some programming languages. When I search anything about any program it is written in more than one programming language. How can I do it. And it is important to use ...
user avatar
3 votes
1 answer
151 views

How can one bake a GUI framework inside an interpreter without freezing the interpreter?

I am writing a bytecode interpreter in C for a simple programming language. I want to add GUI capabilities to the language. As a first step, I decided to bake into the interpreter a wrapper for the ...
user avatar
  • 20.7k
0 votes
1 answer
240 views

Have the inventors of Java ever publicly expressed regret about hashCode and equals in class Object? [closed]

I was talking to a colleague recently about hashCode and equals being methods in class Object in Java (among other languages). I am from a more theoretical background while my colleague is more of a ...
user avatar

1
2 3 4 5
28