Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
53 views

What are the benefits of aggregating structure and functions associated with it in one object?

What are the benefits of aggregating a structure and functions associated with it in one object? What are the benefits of explicitly decalring a class. If i write procedural code i already know that ...
1
vote
2answers
122 views

What does the colon before the name mean in this JSON like string?

I encountered this string that looks like JSON syntax but I've never seen a property with a colon before it and not with a backwards greater than or equals sign: Badge { :id=>36, :name=&...
27
votes
13answers
10k 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 ...
-1
votes
1answer
67 views

Reactive programming language [closed]

I had been using react-js and really like its concept so I want to know if there is a programming language/framework that sort of works like it. For instance, I want to define: var A = something var ...
0
votes
3answers
216 views

Side-effect free programming language for reproducible data transformation

Is there a usable programming language that disallows all side effects except for its input stream (aka STDIN) and its output stream (aka STDOUT)? All executable scripts in the language should be ...
3
votes
2answers
203 views

Are there any languages that let you specify that a function can only be called from a single call site? [closed]

Out of curiosity, are there any languages that let you tag a function with an attribute that indicates that it may only be called from a single call-site, such that if any code tries to call the ...
2
votes
1answer
180 views

Why did Java and C sharply dip in popularity around 2017 in the TIOBE index? [closed]

The TIOBE Programming Community Index shows Java and C dramatically falling in popularity between late 2016 and mid 2017 before rebounding by mid 2018. What is the cause of the volatility? Source: ...
29
votes
10answers
7k views

Why are standard libraries not programming language primitives? [closed]

I was thinking why are there (in all programming languages I have learned, such as C++, Java, Python) standard libraries like stdlib, instead of having similar "functions" being a primitive of the ...
-3
votes
3answers
381 views

Why are script languages so popular? [closed]

I am currently writing a memoire on the evolution of developing tools. Among them is of course the programming languages. I made some researches, and a lot of the most popular languages are scripts ...
1
vote
3answers
101 views

Is it really correct to talk about compiled and interpreted languages? [duplicate]

It is pretty obvious that any interpreted language CAN also be compiled. For a long time I thought that it was not necessarily the other way around. Then I discovered Ch which is an interpreter that ...
0
votes
2answers
39 views

What's the exact usage of the term “foreign function interfaces”?

I'm working on a project that requires using multiple programming languages. I'm confused about what term to use to specify the interfaces available to bind two languages, e.g JNI, ctypes, jpype, etc. ...
8
votes
3answers
429 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 ...
1
vote
1answer
63 views

Meaning / usage of vertical bar in Practical Foundations for Programming Languages?

I'm working my way through Practical Foundations for Programming Languages but am finding some of the notation difficult to follow. In section 3.3 (page 46 of linked PDF) the author introduces a ...
2
votes
3answers
390 views

From a language design perspective, is the reference type in C++ mis-designed

Besides the fact that all primitive types of C++ are copy assignable except the reference type, it also doesn't play well with containers or any other parts of the language where copy-assignable ...
-3
votes
2answers
173 views

Why was the caret used for exponentiation in BASIC?

As far as I have been able to find, the first language to use ^ for exponentiation was BASIC, in 1964. Earlier languages, such as Fortran, used other symbols such as ** for exponentiation (although in ...
0
votes
2answers
268 views

Understanding Context Free Grammar using a simple C code

I'm trying to understand the difference between terminal and non-terminal values in a real language. I wasn't able to find enough examples on real language CFGs on the internet, most examples are ...
0
votes
1answer
90 views

Why are new modern languages shifting to a variableName: VariableType syntax approach? [duplicate]

Modern languages like Rust, Kotlin, and TypeScript, define their syntax to declare variables as: myVariableName: VariableType As opposed to the C-like approach not so old languages like JavaScript, ...
-1
votes
1answer
164 views

Writing programs in an unsupported language

Is it possible to write a program in a language unsupported by an editor or IDE, save it, then run it in different IDE or editor that does support the language?
-2
votes
1answer
118 views

What is the minimum set of operations a language implementation must provide for it to be usable for all applications?

As a fun hobby project, I'm writing a simple bytecode VM and a compiler from a basic high-level language to the said bytecode. (Offtopic: the compiler is inspired by Jack Crenshaw's awesome tutorial -...
3
votes
1answer
117 views

How hard should I try to write idiomatic code in a polyglot environment?

I work on a small team (2 primaries with one or two other occasional contributors) on a project/product that spans a number of separate platforms. We do embedded firmware in straight C on Arm0 chips. ...
0
votes
1answer
138 views

Is JavaScript unique in the way it treats missing property access?

Javascript has the behavior where an error is not thrown on missing property access on objects, which is the cause of many pernicious bugs: console.log("iPhone".missingProperty) // undefined I'm ...
0
votes
2answers
221 views

What makes PHP a language and jQuery a library?

PHP is written in C, but is considered a language. What makes it different from something like jQuery which is considered to be a library of Javascript? Why is PHP not a library of C or jQuery a ...
3
votes
3answers
475 views

In functional programming, what it means “Order of evaluation does not matter” when function is pure?

In context of pure functions in FP, apart from several benefits mentioned like easy to reason about, testability it also says "order of evaluation does not matter" since output remains same for given ...
1
vote
0answers
83 views

What obstacles should I expect in building universal Abstract Syntax Tree's manipulation tool?

I am trying to build code generation and transformation tool and hence I need software for Abstract Syntax Tree manipulation for at least three languages (Coq, Haskell, Java). So far I have managed to ...
0
votes
3answers
306 views

Is there a programming language with objects and generics, but without inheritance?

The GO programming language has objects but no inheritance. It also has generics for the built-in types Array and Map. Is there a programming language with objects but no inheritance and with generics ...
1
vote
6answers
339 views

Is it okay to have a parent class that doesn't represent an entity and doesn't have an “Is-A” relationship with its child classes?

I want to have an array that can hold elements of many classes data types, and each of these classes have a method called printInfo(). The way I can do that is by having a parent class called ...
4
votes
5answers
545 views

What is the “killer feature” of OOP? [closed]

I don't have much experience working with OOP, so I'm trying to understand what is the feature (or features) that would give you a great motive not to write some program in a procedural language, but ...
2
votes
4answers
283 views

Is there an object-oriented language that doesn't allow you to have private member variables? [closed]

I know that JavaScript doesn't explicitly allow you to have a member variable of an object as private, but you can do that implicitly by using closures. But is there an object-oriented language that ...
1
vote
3answers
238 views

Programming Language Interoperation for Website

Say I have one website created with the LAMP stack and another with the MEAN stack. I want to create a program which estimates the entropy of a password so that I can add a password strength meter to ...
2
votes
1answer
202 views

I'm moving away from using global variables after 7 years, I need help figuring out the basics

Until recently I was a huge fan of global variables because they are simple and allow building solutions to problems quickly. At one point I had to make a slight change to my application: it needed ...
-1
votes
1answer
69 views

What kind of of tools/architecture would work well for a student team competing in a robot soccer competition?

The scenario is as follows. There is a PC running a complex piece of AI software wirelessly controlling a number of soccer robots. This software is written and maintained by a team of students that ...
9
votes
1answer
154 views

Name of technique for inferring type arguments of a type parameter?

Setup: Let's assume we have a type called Iterator which has a type parameter Element: interface Iterator<Element> {} Then we have an interface Iterable which has one method which will return ...
150
votes
7answers
24k views

Was the C programming language considered a low level language when it came out?

Currently C is considered a low level language, but back in the 70's was it considered low level? Was the term even in use then? Many popular higher level languages didn't exist until the mid 80's ...
0
votes
1answer
189 views

How cross platform and different programming languages deployment is done?

I'm interested to know how software deployment for cross platforms as well as different programming languages happen. Like, Customers is on - linux and Windows Languages - Java, .Net, Ruby and ...
4
votes
2answers
435 views

Was Java the first programming language to support inner classes?

The Wikipedia article on the subject of inner classes enumerates a number of programming languages that support nested class definitions. Historically speaking, which programming language first added ...
0
votes
1answer
239 views

Do any programming languages let you use other languages without restriction within them?

This may be a stupid question, and it would certainly take one Hell of a lexer, but do any extant programming languages allow you to do something like: c# (1.2) { // c# code } Perl (5) { # ...
8
votes
2answers
518 views

Only one number type in language design

I am currently learning about compiler construction and language design and I am thinking about what native datatypes I want to support in my language. Now there is a whole lot of languages that make ...
4
votes
3answers
314 views

Using of different language in same project

I was started programming in 6 months ago in college. I learned Python, C and Java. I want to create a project and using these languages. For example to searching part should use C because it's faster ...
-1
votes
1answer
97 views

Do JITs typically have their own internal assembler, use a library, or use an executable assembler?

Amongst the successful and widely used JITs out there (e.g. JVM JITs, JavaScript JITs, LuaJIT), is there a strong consensus on how the JIT compiler should interface with an assembler? The plausible ...
111
votes
12answers
26k views

Why are multiple programming languages used in the development of one product or piece of software?

I am a recent grad student aiming to start my Master's in Computer Science. I have come across multiple open source projects that really intrigue me and encourage me to contribute to them (CloudStack, ...
1
vote
1answer
124 views

How do you actually utilize coding to produce projects? [closed]

I’m new to the whole programming society and the languages I’m learning right now are C++ and Lua. But as I’m learning it I can’t help but wonder how simple syntax such as print and if statements and ...
-4
votes
1answer
139 views

Assemblers Used During the Development of a Programming Language?

I am currently designing and developing a programming language from scratch. Mostly as a learning experience. Although it's not entirely related to the question, it's important that you know a little ...
4
votes
2answers
342 views

Should I duplicate code across languages?

Where I work, we use a language for our desktop software development (Delphi) and an other for web apps (asp.net/c#). My bosses want me to implement a feature on a website but they ask me to develop ...
0
votes
4answers
470 views

Why does C provide both the comma operator and the semicolon to separate statements?

Both the comma operator and the semicolon can be used to separate statements. Let's consider this simple code: #include <stdio.h> void do_something(int*i) {(*i)++;} int main() { int i; ...
11
votes
2answers
2k views

Is i,j = 1 really misleading? [closed]

There is a common argument about multiple variable initialisation in a one liner, that is : Consider for example int i, j = 1; which might lead some people to mistakingly believe both variables ...
0
votes
1answer
366 views

Grammar by example

Is there an automated approach to generate a grammar (which could be used later in a compiler tool such as ANTLR or similar) from given examples of a language? With more detail: assumed a technical ...
5
votes
2answers
578 views

Type-based memory safety without manual memory manage or runtime garbage collection? [closed]

Let's say we wanted a typeful, pure functional programming language, like Haskell or Idris, that is aimed at systems programming without garbage collection and has no runtime (or at least not more ...
3
votes
2answers
309 views

How to avoid generating verbose code when compiling from a higher level language to a lower one?

I apologize in advance for the vague title. I didn't want to make it overly verbose, so allow me to explain more in-depth below: I've currently been developing a strong, statically typed language ...
9
votes
4answers
900 views

Is having a generator language facility such as `yield` a good idea?

PHP, C#, Python and likely a few other languages have a yield keyword that is used to create generator functions. In PHP: http://php.net/manual/en/language.generators.syntax.php In Python: https://...
5
votes
2answers
162 views

How to support inheritance when designing an OO language without classes

I'm designing a programming language for a game, to be used as the main way of interacting with the game, as opposed to using other methods of control, such as the arrow keys or mouse. My plan is to ...