Artificial languages for instructing computers to do steps of computation in order to complete tasks. They allow programmers to communicate with computers.

learn more… | top users | synonyms

1
vote
4answers
105 views

When is an object passed to a function?

Trying to clearly state the semantics of a function call. In calling a function, are the arguments passed to the function the ones the calling code initially gives or the ones the function ...
-2
votes
0answers
98 views

What Classes as a “C-derived” language [on hold]

Original Post I have recently been looking into the UK EDexcel Computing Specification and the first control assessment (labled "Practical Programming") mentions this: Students must select one ...
17
votes
4answers
1k 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, ...
19
votes
1answer
1k views

Why do arrays in .Net have Length but other collection types have Count? [closed]

In C# for example, arrays have Length property. But other collection types like lists, etc. have Count property. Is there a reason why these two are different? If so I would like to know.
32
votes
13answers
38k views

Why is C++ still preferred to build heavy GUI apps over the latest dynamic languages? [closed]

I see that most of the apps that include heavy GUI content are usually developed in C++. Most of the games/browsers are coded in C++. Can't we just develop better GUI apps with the latest dynamic ...
13
votes
1answer
349 views

In what programming language did the use of the percent sign (%) to mean modulo/remainder originate?

In what programming language did the use of the percent sign (%) to mean modulo/remainder originate? This previous post1 explains that the symbol % was likely chosen because it includes a slash, ...
-2
votes
1answer
149 views

Question about switch-case statement [closed]

What happens, and does code work properly if we write switch-case structure like this, why its not good to write code like this? I'm porting some firmware and have switch-case statement interrupted ...
2
votes
4answers
88 views

Clean Abstract Syntax Tree

I'm writing a toy compiler for fun. Basically, my problem is that I don't want to clutter the AST with stuff like debug information (symbol tokens, locations of tokens, etc) as well as data that the ...
54
votes
11answers
18k views

Why is String immutable in Java?

I couldn't understand the reason of it. I always use String class like other developers, but when I modify the value of it, new instance of String created. What might be the reason of immutability ...
-4
votes
1answer
148 views

Comparing the Java language to non-Java JVM languages [closed]

I was contemplating on the necessity of different non-Java languages coming up on the JVM. Apart from syntactic sugar and built-ins, does any of them actually exploit some corner of the JVM, which has ...
1
vote
1answer
129 views

How do references work in R?

I'm finding R confusing because it has such a different notion of reference than I am used to in languages like C, Java, Javascript... Ruby, Python, C++, well, pretty much any language I have ever ...
0
votes
0answers
74 views

Why are scriptlets considered bad practice in JSPs when much more popular languages such as PHP seem not have any problem with them? [duplicate]

Why is doing <% if(blahblah) { //do something } %> in a JSP considered to be bad practice when noone who writes PHP seems to have any problem with doing essentially the ...
5
votes
2answers
753 views

A study shows that lines_written/time is language-independent for most programmers. Where can it be found? [closed]

A study shows that lines_written/time is language-independent and application-independent for most programmers. If this were true it would imply that the most terse a language is, the more productive ...
4
votes
2answers
437 views

Why do people confuse C-type strings and STL strings [closed]

The last week I saw at least three questions where people were confused about the differences between char * and std::string or made some related mistakes. Don't get me wrong, I don't have a problem ...
22
votes
4answers
16k 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 ...
3
votes
2answers
516 views

Giving variables default values vs. treating accessing an undefined variable as an error

Having messed around with several scripting languages and being a bit of a linguist, there seems to be a way to divide dynamically typed languages into two groups: languages that give variables a ...
3
votes
2answers
132 views

Are string characters assigned a numerical value in context of how they are assigned in a programming language?

For context I am fairly new to programming after returning back to it after programming a number of years ago... I was reading Bjarne's intro programming with C++ and was wondering if alphabetical ...
2
votes
2answers
92 views

Incorporating functions into a Shunting-Yard algorithm implementation

tl;dr What would be a simple way of incorporating functions into a Shunting-Yard algorithm implementation? If only expressions like function(arg1, arg2, arg3) were allowed (where function is some ...
0
votes
2answers
156 views

Are private members useful anymore? [duplicate]

Watchpoints and data break points make it possible to watch the changes of a value in memory in many languages. Much of the justification I have seen for getters and setters and private variables ...
0
votes
0answers
41 views

Synchronizing webpage and local pdf

I would like to solve the following problem. On my website, I have a list of my publications. I also have my list of publications on a latex file of my cv. The issue is that I update these manually, ...
-1
votes
2answers
79 views

Will statically typed, compiled programming languages be affected by Microservices Architecture? [closed]

Judging based on my experience, as systems grow bigger, statically typed languages like Java or C# tend to be more reliable and easier to manage. But do we need all the advantages of such languages ...
8
votes
2answers
1k views

Documenting a programming language: Reference Manual

We are looking at revamping documentation across our product line. Part of that includes reference manuals for a programming language used as part of the system. When writing a reference manual for a ...
-2
votes
1answer
83 views

Are there languages with Primitive Types whose default values are null? [closed]

For example: in C#, the default value of int is "0"; however you have the option to use int? with a default value of "null". Is there a language where this is non-optional? Specifically, where the ...
66
votes
13answers
6k views

Do objects in OOP have to represent an entity?

Does an object have to represent an entity? By an entity I mean something like a Product, Motor, a ParkingLot etc, a physical, or a conceptual object, something that is well defined, with some core ...
0
votes
0answers
69 views

Why are datatypes different in terms of bit size based on complier, and OS used

I was reading a tutorial on C++ as I am new to programming, and I was wondering why the sizeof operator gives different output depending on what you're programming with.
70
votes
15answers
25k views

What makes C so popular in the age of OOP? [closed]

I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java. TIOBE Programming Community Index I'm curious as to why, in this age of OOP, C is ...
1
vote
3answers
256 views

Is there any programming language(s) which has mathematical number types? [closed]

I may not have worded the title correctly. Is there any programming language(s) which deals with natural mathematical number types rather than the typical data types we see like Int32, Int64, Float, ...
-1
votes
1answer
62 views

Short Circuit Execution [closed]

Modify the car painting example car.color = favoriteColor ||"black"; so that the car is painted with your favorite color if you have one; otherwise it is painted with the the color of your garage: ...
16
votes
5answers
4k views

Functional Languages that compile to Android's Dalvik VM? [closed]

I have a software problem that fits the functional approach to programming, but the target market will be on the Android OS. I ask because there are functional languages that compile to Java's VM, ...
31
votes
5answers
5k views

Bad practice - switch case to set environment

In the last three years that I have worked as developer, I have seen a lot of examples where people use a switch statement to set the path (both in back-end and front-end) for a URL. Below is an ...
-1
votes
1answer
64 views

execute selection in console in C++ like python or R language [closed]

I am started to learn C++ using as IDLE Clion of jetbrain company. Normally using the IDLE of Python (i.e., Pycharm of Jetbrain) or R project i am able to execute selection in console line-by-line my ...
1
vote
2answers
129 views

Looking for a specific programming paradigm [closed]

I am searching for programming languages with a certain paradigm, or the name of the paradigm which works like follows: You start with writing the source code of a program or something more like a ...
29
votes
7answers
14k views

What is a “side effect?”

I haven’t clearly understood the concept of side effect. What is side effect in programming? Is it programming language dependent? Is there such a thing as external and internal side effects? ...
20
votes
6answers
4k views

Why these attempts to water down Scala with Xtend and Kotlin? [closed]

So now Eclipse has offered Xtend and JetBrains is offering Kotlin - both of which seem to be watered down versions of Scala. My question is why? I've played with Scala a bit and it's not that hard. ...
3
votes
6answers
628 views

Should I use a source-to-source or a traditional compiler in order to develop my own Programming Language?

I'm really interested in writing my own general-purpose high-level programming language, but I'm somewhat confused. I know that Python and Ruby were written in C, which makes me wonder that if I want ...
2
votes
3answers
488 views

Is functional language without runtime written in C possible? [closed]

Every functional language that compiles to native code relies on quite big runtime written in C programming language (well at least ones that I know of, for example Haskell, OCaml, Gambit/Chicken ...
-6
votes
1answer
94 views

How do you compare Languages? [closed]

How do you rate different programming languages and compare them? I've worked with many languages including PHP, JS, Java, C++, C# .... and sometimes I hear people say for example php is old and ...
2
votes
4answers
380 views

“Imprinting” as a language feature?

Idea I had this idea for a language feature that I think would be useful, does anyone know of a language that implements something like this? The idea is that besides inheritance a class can also ...
4
votes
9answers
938 views

Mutating Programming Language?

For fun I was thinking about how a programming paradigm could differ from OOP and came up with this concept. I don't have a strong foundation in computer science so it might be common place without me ...
62
votes
9answers
10k views

How were the first compilers made?

I always wonder this, and perhaps I need a good history lesson on programming languages. But since most compilers nowadays are made in C, how were the very first compilers made (AKA before C) or were ...
14
votes
5answers
3k views

Why is JavaScript not used for classical application development (compiled software)? [closed]

During my years of web development with JavaScript, I come to the conclusion that it's an incredible powerful language, and you can do amazing things with it. It offers a rich set of features, like: ...
75
votes
13answers
27k views

What can multiple threads do that a single thread cannot? [closed]

While threads can speed up execution of code, are they actually needed? Can every piece of code be done using a single thread or is there something that exists that can only be accomplished by using ...
17
votes
6answers
2k views

What came first, the compiler, or the source?

I'm curious about the birth of the compiler. How did programming begin? Did people first build hardware that recognized a certain set of commands, or did people define a language and then build ...
12
votes
3answers
6k views

Managed Languages vs Compiled Language difference?

I get confused when people try to make a distinction between compiled languages and managed languages. From experience, I understand that most consider compiled languages to be C,C++ while managed ...
1
vote
1answer
87 views

Writing a parser on top of an XML-based AST: am i doing it right?

I have a sort of AST defined in XML that i'm trying to parse and evaluate. The XML tree contains the tokens and all the information i need. However, i'm finding it difficult to do it "properly". ...
-1
votes
4answers
839 views

The need for source control software - Team Foundation Server? or something different? [closed]

Recently, Here at the company, more than one programmer was appointed in charge for a LightSwitch(C#) software development project and immediately there was a need of some sort of source ...
0
votes
1answer
149 views

Limitations of modern programming languages for low-level network programming [closed]

For say a network packet sniffer, are there any of the more modern high level languages such as C# or Java, that would actually be unsuitable or limiting when it would come to constructing a packet ...
9
votes
5answers
735 views

Is it necessary to have an Android device to learn programming for the Android?

Is it necessary to have an Android device to learn programming for the Android? Currently, Java is my primary programming language.
42
votes
12answers
5k views

What programming language generates fewest hard-to-find bugs? [closed]

What language, in your opinion, allows the average programmer to output features with the least amount of hard-to-find bugs? This is of course, a very broad question, and I'm interested in very broad ...
6
votes
2answers
168 views

What is the minimum practical definition for the Scheme language?

What is the smallest practical set of primitives that can be used to define the Scheme language? For example, map can be defined as (define (map proc lis) (cond ((null? lis) '()) ...