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
1answer
133 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 ...
7
votes
9answers
9k views

Why are virtual machines required?

Instead of compiling the source code for the respective OS (on which it is targeted), you compile once and run everywhere. For the sake of this question, I would call it VM (for example, both for ...
16
votes
4answers
3k views

What is an example of a continuation not implemented as a procedure?

An interesting discussion about the distinction between callbacks and continuations over on SO has prompted this question. By definition, a continuation is an abstract representation of the logic ...
2
votes
1answer
72 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 ...
20
votes
11answers
7k views

How do you learn a new programming language? [duplicate]

I am C++ developer with some good experience on it. When I try to learn a new language ( have tried Java, C#, python, perl till now) I usually pickup a book and try to read it. But the problem with ...
3
votes
2answers
2k views

Type safety - GO vs C pointers

C is a static-typed language that is not type-safe, because pointers(void *y) let you do pretty much anything you like, even things that will crash your program. GO is also a static typed language ...
39
votes
9answers
7k 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) ...
40
votes
5answers
8k views

What makes a scripting language “embeddable”?

According to my experience, Wikipedia and prior answers, a scripting language is vague category of languages which are high-level (no manual memory management) and interpreted. Popular examples are ...
1
vote
1answer
131 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 ...
1
vote
4answers
322 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?
11
votes
8answers
32k views

Why might an ASP.Net website load slowly? [closed]

Anecdotally, I've visited many .aspx website that require a significant amount of load time for each page. Is my experience unique? If not, why might an ASP.Net website load slowly? Edit: It's now ...
12
votes
4answers
5k views

What constitutes a programming language and how does one copyright a programming language?

I've decided to create a programming language of my own, mostly just for fun. However, I got interested in the legal aspect of it all. You can, for example, licence specific programs under specific ...
32
votes
8answers
8k views

What's the tradeoff for type inference?

It seems that all new programming languages or at least the ones that became popular use type inference. Even Javascript got types and type inference though various implementations (Acscript, ...
-2
votes
1answer
133 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#...
0
votes
2answers
144 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 ...
191
votes
9answers
69k views

Is every language written in C?

Sometimes while programming in different languages (C/C++, C#), this thought comes to my mind: Is each and every language written in the C programming language? Is the C language the mother/father ...
21
votes
14answers
2k views

Should data structures be integrated into the language (as in Python) or be provided in the standard library (as in Java)?

In Python, and most likely many other programming languages, common data structures can be found as an integrated part of the core language with their own dedicated syntax. If we put LISP's integrated ...
15
votes
5answers
708 views

Is there a programming language where every string is a valid program?

Does there exist a Turing complete programming language such that for a fixed alphabet (say, ASCII), every possible permutation of those characters is a semantically valid program capable of being ...
0
votes
1answer
35 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 ...
3
votes
4answers
1k views

How important is an in-depth knowledge of the Common Language Runtime to a .NET developer?

I wonder how many .NET developers have a working knowledge of CIL and where it has been useful to them. In case you are missing my meaning, here is a simple CIL example to add two locations together: ...
12
votes
5answers
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 ...
6
votes
5answers
4k views

Which programming languages don't use operator precedence besides Lisp-like languages? [closed]

And what do you think about operator precedence? Would be harder programming in a language where the operations are executed in sequential order? Ex.: 2 + 3 * 4 == 20 2 + (3 * 4) == 14 OK, the Lisp ...
4
votes
5answers
676 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 ...
39
votes
4answers
31k views

Difference between a REPL and interactive shell

Noob question. I am not quite able to tell the difference between a REPL and an interactive shell just by reading the definitions on Wikipedia. Wiki notes that REPL is a particular kind of ...
-3
votes
2answers
94 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 ...
8
votes
8answers
19k views

How to abbreviate variable names [closed]

I always struggle in abbreviating variable names. Is there any standard for abbreviating variable names?
15
votes
9answers
2k views

Will I ever be able to code client-side browser code in a language of my choice? [closed]

I'll be brutally honest: I hate writing client side code in JavaScript. I'm not a fan of this language, to say the least. It seems silly to me that browsers support a programming language, rather than ...
0
votes
1answer
111 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. ...
8
votes
4answers
1k views

What's the first language that had the 'Unless' conditional/loop built into itself?

What's the first (oldest) language that had the 'Unless' conditional/loop built into itself? Where an example could be unless (myVar) == if (!myVar) until (myVar) == while (!myVar)
41
votes
9answers
6k views

Is memory management in programming becoming an irrelevant concern?

Background I revisited an old (but great) site I had not been to for ages - the Alioth Language Shootout (http://benchmarksgame.alioth.debian.org/). I started out programming in C/C++ several years ...
-1
votes
3answers
282 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 ...
9
votes
3answers
3k views

Should we be using functional and/or logic programming languages more?

I've programmed a bit of Haskell and Prolog as part of a couple of uni courses, but that's about it. And I've never seen it been used in industry (not that I've had much of working experience to begin ...
21
votes
9answers
46k views

How is C different from C++?

Many people have said that C++ is a completely different language than C, but Bjarne himself has said that C++ is a language that is extended from C hence that is where the ++ comes from. So why does ...
8
votes
4answers
1k views

Definition of “Behaviour”?

What is exactly meant when software-engineers talk about "behaviour" in contrast to "state" (Definition of "state")?
1
vote
1answer
78 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 ...
110
votes
5answers
91k views

Why were default and static methods added to interfaces in Java 8 when we already had abstract classes?

In Java 8, interfaces can contain implemented methods, static methods, and the so-called "default" methods (which the implementing classes do not need to override). In my (probably naive) view, there ...
43
votes
5answers
16k views

When does it make sense to compile my own language to C code first?

When designing an own programming language, when does it make sense to write a converter that takes the source code and converts it to C or C++ code so that I can use an existing compiler like gcc to ...
8
votes
1answer
950 views

Why is the cyclomatic complexity equal to two for a simple Hello World?

I would have two questions related to cyclomatic complexity: Can I use this metric for a whole app? I guess I cannot, as it would be incredibly large number, considering functions calling functions ...
74
votes
10answers
43k views

Why has C prevailed over Pascal? [closed]

My understanding is that in the 1980s, and perhaps in the 1990s too, Pascal and C were pretty much head-to-head as production languages. Is the ultimate demise of Pascal only due to Borland's neglect ...
9
votes
6answers
2k views

How is static typing really helpful in bigger projects?

While curiosing on the main page of a scripting programming language's site, I encountered this passage: When a system gets too big to keep in your head, you can add static types. This made me ...
31
votes
14answers
12k views

Why don't programming languages automatically manage the synchronous/asynchronous problem?

I have not found many resources about this: I was wondering if it's possible/a good idea to be able to write asynchronous code in a synchronous way. For example, here is some JavaScript code which ...
-8
votes
1answer
88 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 ...
3
votes
0answers
64 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 ...
3
votes
3answers
11k views

What are the advantages of pass by value?

I always thought pass by value is a legacy from the early languages, because the designers had never seen anything else. But after seeing the brand new languages like Go adapting the same principle ...
34
votes
3answers
10k views

Why is a Boolean value stored as a byte inside of a computer when it only requires one bit

I recently started learning to write code, and in my book I came across this question. "Why is a Boolean value stored as a byte inside of a computer when it only requires one bit?" can someone shed ...
2
votes
2answers
130 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 ...
0
votes
2answers
160 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 ...
27
votes
6answers
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 ...
0
votes
3answers
536 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, ...
41
votes
6answers
10k views

Why is type inference useful?

I read code way more often than I write code, and I'm assuming that most of the programmers working on industrial software do this. The advantage of type inference I assume is less verbosity and less ...

1
2 3 4 5
28