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

-3
votes
0answers
40 views

Type safe substituion for parameter passing [on hold]

What are some examples of type safe substitution for parameter passing as well as for return types in subtyping introduced through subclassing. Does the Liksov Substitution Principle apply to them?
8
votes
2answers
1k views

Why use typedefs for structs?

in C (ANSI, C99, etc.), structs live in their own namespace. A struct for a linked list might look something like this: struct my_buffer_type { struct my_buffer_type * next; struct ...
3
votes
3answers
151 views

How do I calculate server requirement for a web application

I am developing a backend where in I will be exposing APIs for my mobile application. Users can register,add products,share the links of products through email/sms/anywhere and others can click on it ...
5
votes
2answers
124 views

Composable concurrency in Java or any other programming language

While I was reading a research paper on concurrency named Software and the Concurrency Revolution (html version). I came across following lines: Unfortunately, although locks work, they pose ...
2
votes
2answers
120 views

Can a generic piece of C code be converted an FSM?

I understand that any language worth its salt can encode a Finite state machine. My question is the opposite, is it possible to convert an arbitrary piece of code ( say in C ) to a functionally ...
0
votes
0answers
79 views

Are there any attempts to fix the flaws of javascript? [closed]

Javascript has some known terrible design flaws, most notably: The == operator Automatic type coersion Optional semicolons Dynamic typing Are there any compile-to-javascript languages that fix ...
6
votes
4answers
44k views

Is CSS a programming language? [duplicate]

Possible Duplicate: Why does it matter that HTML and CSS are not programming languages? As I understand a programming language is something that can be used to solve a problem/perform an ...
-4
votes
0answers
68 views

What is plug and play in programming? [on hold]

I recent met a term plug and play. As I understand that it means we add the dependencies needed and remove dependencies we don't need from the project. But I am still confused. So what does plug and ...
5
votes
1answer
2k views

Are the criticisms against Dart valid?

According to this Wikipedia article, Microsoft, Apple, Mozilla, and others criticize Dart, a programming language Google introduced to work in web browsers, because they feel "it seems harmful (cf. ...
-3
votes
0answers
81 views

Replicating ADF test in R

I'm currently trying to understand unit root tests and the ADF formula used. The package I'm trying to work with is the "urca", dataset "npext", and the test I'm trying to replicate is the Nelson ...
1
vote
2answers
153 views

“Fuzzy” parsing in different languages

I have a bunch of plain-text like this: 1 MILE, PACE, PURSE $1,100. FILLIES & MARES N/W $541 L5 STARTS AE N/A $301 L5 & N/A $60 PS IN 2015-16 DRAW INSIDE ...
34
votes
2answers
3k views

First ATMs programming language

First ATMs performed tasks like a cash dispenser, they were offline machines which worked with punch cards impregnated with Carbon and a 6-digit PIN code. Maximum withdrawal with a card was 10 pounds ...
3
votes
1answer
217 views

Is using a function inside a for loop bad practice?

I recently read somewhere that calling a function within a loop is considered bad practice. Is this true? So for example, if I had the following: function foo(value){ console.log(value); } var ...
3
votes
1answer
62 views

Self-compilation in Forth

What is Self-compilation (a.k.a. Meta-compilation) in Forth? How it works and why is it useful? Does it have any practical usage and is it still used in modern systems?
17
votes
6answers
1k views

Do you write secondary languages in your CV? [closed]

Every programmer has a primary language that he works with most of the time and is therefore very familiar with. But there are also languages that you kinda know, in the sense that you used to know ...
1
vote
1answer
58 views

Had operator precedence rules changed through the history of a computer language?

I would think it would be a massive breaking change if something like this were to happen on a widely deployed language like C/C++, but maybe it had happened in the past. Bonus related question: How ...
16
votes
5answers
1k views

Can a programming language by design enforce “clean code”? [closed]

So I'm coding my first projects in C++ and it seems that it takes more effort to make the code "clean", rather than merely work. I.e. it seems as if C++ "allows" to write ugly, but working code. ...
49
votes
3answers
7k views

What are the biggest differences between F# and Scala?

F# and Scala are both functional programming langugages that don't force the developer to only use immutable datatypes. They both have support for objects, can use libraries written in other languages ...
0
votes
4answers
2k views

Is it bad to learn multiple programming languages? [closed]

I started learning PHP and I was able to get myself familiar with it. Now, I want to explore other programming languages like PERL so that I can compare it myself to PHP. Will I be confused to learn ...
5
votes
3answers
432 views

Why should a language prefer indentation over explicit markers for blocks?

I am learning Haskell, and I was looking for an auto indentation tool. I didn't look much, and learned that in Haskell (as in Python), indentation signifies a block. As a result, I'm guessing that ...
47
votes
4answers
9k views

Why do so few languages with a variable-type 'operator' exist?

I mean it in this way: <?php $number1 = 5; // (Type 'Int') $operator1 = +; // (Type non-existent 'Operator') $number2 = 5; // (Type 'Int') $operator2 = *; // (Type ...
1
vote
2answers
71 views

Language interaction

How does a program composed of several languages work? How do the languages work together or interact with each other? How do they understand stand each other? How do you know when to use any given ...
3
votes
4answers
278 views

What does weak static typing/strong dynamic typing mean?

For most of my career, I've been working with strong static typed languaged such as Java. For this reason, probably I've mixed up these two typing dimension (strongness and staticness). I came upon ...
0
votes
1answer
43 views

Retrieve variable from Console.ReadLine()

I am making a tic-tac-toe game in C#. I have a string variable for each square. I want to make it so the user inputs the square name i.e. (topMiddle). Then I declare the input playerInput. I want to ...
17
votes
4answers
1k views

Is it necessary to follow the standard, take the C standard for that matter?

There are some very experienced folks on Stack Overflow who always talk about the C standard. People seem to not like non-portable solutions, even if they work for me. Ok, I understand that the ...
40
votes
13answers
8k views

Why do you have to specify the data type when declaring variables?

In most coding languages (if not all) you need to declare variables. For example in C# if its a number field then int PhoneNumber If I'm using normal English language I do not need to declare ...
3
votes
8answers
710 views

Why can't we just use variables instead of constants?

I can't see the point of constants. For example I can use the famous example of PI: PI = float(3.14) Here I get the job done without a constant. Who cares if the value never changes during the ...
6
votes
4answers
5k views

Left and Right most Derivation

So i understand the semantics of derivations as far as Backus Naur Form goes. One thing I cannot find in any text book or the various lecturers' notes that are on-line is this. When would a right ...
4
votes
1answer
133 views

Is there a programming language which requires argument qualifiers (reference/value) to be specified at the call point?

For quite a long time now, I have been using a calling convention from C++ google style guide, which boils down to the following: "[for a function] arguments are values or const references while ...
18
votes
5answers
2k 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, ...
32
votes
4answers
9k views

Why does Java not do type inference?

I have always wondered why Java does not do type inference given that the language is what it is, and its VM is very mature. Google's Go is an example of a language with excellent type inference and ...
7
votes
3answers
233 views

What paradigm to use when determining shell script vs a “proper” programming language?

For a while now, I have been automating tasks by writing shell scripts in bash. These have gradually become more and more complicated, and I am now finding that bash scripts are a little too simple ...
45
votes
8answers
9k views

Why didn't == operator string value comparison make it to Java?

Every competent Java programmer knows that you need to use String.equals() to compare a string, rather than == because == checks for reference equality. When I'm dealing with strings, most of the ...
4
votes
6answers
575 views

Does a programming language have to be compiled to be considered a programming language? [duplicate]

A person I met recently had an argument. It was that a programming language had to be compiled to be considered a programming language. This would make HTML/CSS (unless you're using SCSS or LESS) not ...
28
votes
15answers
2k views

I'm writing about language syntax. Is there a language out there in which parameters are placed inside method name?

in JavaScript: function getTopCustomersOfTheYear(howManyCustomers, whichYear) { // Some code here. } getTopCustomersOfTheYear(50, 2010); in C#: public List<Customer> ...
8
votes
6answers
7k views

What are some characteristics of Python that makes it unique as its own language? [closed]

What are some characteristics of Python that makes it unique as its own language? I'm looking for any sort of characteristics ranging from good to bad, useful to hindrance, syntax to real-world usage, ...
12
votes
5answers
1k views

What drives the adoption, or not, of new programming languages? [closed]

I'd really like to focus on why some new programming languages are adopted in the mainstream, and others remain relatively niche. I'd like to know about things like specific use cases, backwards ...
2
votes
2answers
7k views

Closest Point of Approach (CPA) mathematical formula in ship radar

I was recently searching for the mathematical formula to find closest point of approach (CPA) between one ship and another ship. I need to apply the formula in my radar ship program and I can't find ...
-1
votes
1answer
82 views

What is an effect system? [closed]

I read this Wikipedia article, but I found it quite abstract. How can an effect system help me as a programmer?
27
votes
13answers
2k views

Help in understanding computer science, programming and abstraction [duplicate]

Until now, I always believed that you should learn programming languages that make you do low-level stuff (e.g. C) to understand what's really happening under the hood and how the computer really ...
14
votes
10answers
2k views

Can objects constructed from the same class have unique method definitions?

I know this seems like a weird question, since the point of two or more objects sharing the same class is that their behavior is the same, i.e. their methods are identical. However, I'm curious if ...
16
votes
3answers
403 views

Are there alternatives to types for static analysis?

Static typing in a programming language can be helpful for enforcing certain guarantees at compile time- but are types the only tool for this job? Are there other ways of specifying invariants? For ...
0
votes
1answer
62 views

Concurrent languages and non-concurrent dependencies [closed]

We had a bug caused by ruby workers (4 processes, 1 thread each) doing batching records using a legacy mongodb as the store. The race condition was around whether the batch was full or not; with one ...
4
votes
2answers
483 views

Why do we need a seed in Random Number Generators?

I want to know how Random number generator(RNG) works in any PL(Programming language). I know the random methods has short periods. i.e they start repeating the values after specific number of time. ...
30
votes
6answers
6k views

Is an event loop just a for/while loop with optimized polling?

I'm trying to understand what an event loop is. Often the explanation is that in the event loop, you do something until you're notified that an event occurred. You than handle the event and continue ...
10
votes
6answers
12k views

Is Python a good choice to develop UIs? If so, wxPython or Tkinter?

I'm looking forward to develop a desktop application using Python. I'm a beginner and I don't have sufficient expertise in Python. I'm also a Java programmer. Although I have some experience in ...
9
votes
3answers
368 views

How useful is C's “true” sizing of variables?

One thing that always intuitively struck me as a positive feature of C (well, actually of its implementations like gcc, clang, ...) is the fact that it does not store any hidden information next to ...
32
votes
7answers
3k views

Is it actually possible to have a 'useful' programming language that isn't Turing complete?

Where it is accepted that a language has to be Turing complete to be any good, is it actually possible to have a 'useful' programming language that isn't Turing complete? I should clarify that this ...
4
votes
8answers
663 views

One-use variables - has any language ever had them?

A principle that I follow is that, when an identifier is established, it should be a signal to the reader that the value referred to is indeed an abstraction which will be used more than once. That ...
7
votes
4answers
466 views

in dynamic language like javascript how do you know what the argument is?

In Java or Scala if I have an argument configuration: Conf, I can look for Conf class/trait/case class and see its construct so I know which arguments to pass. Recently I started dealing with ...