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

29
votes
6answers
5k 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 ...
0
votes
1answer
74 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 ...
10
votes
6answers
11k 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 ...
-3
votes
0answers
80 views

What language(s) used to develop F-35 software? [on hold]

I'm curious about what kind of technology used in the development of the F-35 fighter jet's software. I just read some news about how bug-ridden the system is, and would like to know what were used to ...
8
votes
3answers
338 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 ...
-3
votes
0answers
108 views

Cons and Pros of ternary operator instead of if/else [closed]

I have some set of code in which same code is written by using two logics. which are as follows. 1. if (cart.getFacebookShare()) { return BigDecimal.TEN; }else{ return BigDecimal.ZERO; } ...
26
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 ...
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
628 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 ...
6
votes
4answers
430 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 ...
1
vote
1answer
10k views

What is ¬ called and what is it for? [closed]

Googling this question has proved somewhat useless, so the ¬ symbol: What is it for? What is is called? Is it used in any programming languages?
28
votes
11answers
18k views

What to do when coding begins to feel boring, like it is all just more of the same? [closed]

I started programming at the age of 6 on a Commodore 64. Now I'm 28, and I have to complete 4 courses from a first degree in Computer Science. I'm starting to get bored with writing code after all ...
19
votes
5answers
10k views
49
votes
7answers
47k views

What is early and late binding?

I keep hearing about early and late binding, but I do not understand what they are. I found the following explanation which I do not understand: Early binding refers to assignment of values to ...
77
votes
12answers
8k views

Does programming in general become easier to read, write and understand as you gain experience?

I'm a beginner in programming and I've been reading books, studying, reading articles, and whatnot. I'm getting great results since I've started learning programming, and when I was a beginner I used ...
0
votes
6answers
471 views

Support for non-english characters?

Is support for non-english characters common in programming languages? I mean, technically, I would think it is feasable, but I don't have any experience in anything other than english, so I don't ...
59
votes
11answers
22k 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 ...
-1
votes
2answers
196 views

Does exist a reflexive compiled language? [closed]

I just wonder if exists a compiled language that can modify it's own machine code. I know that in most common operative systems the executable code is protected during execution time, but maybe if ...
9
votes
4answers
634 views

Why do python generators and functions share the “def” keyword?

Consider the following: def some_function(): return 1 def some_generator(): yield 1 In the code above, some_function is a function, while some_generator is a generator. They look quite ...
0
votes
8answers
4k views

How does if/else work internally in all programming languages? [closed]

if(true/false){ //if condition is true }else { // if condition is false } Everyone knows about the structure of if-else. But what is if actually? Is it a class method, static method or ...
2
votes
3answers
5k views

An ideal way to decode JSON documents in C?

Assuming I have an API to consume that uses JSON as a data transmission method, what is an ideal way to decode the JSON returned by each API resource? For example, in Java I'd create a class for each ...
2
votes
2answers
79 views

Why does Scala name monadic composition as “for comprehension”?

Not sure if it's an appropriate question, but here it goes. I know Haskell's do notation pretty well. And I realized that Scala's "for comprehension" really is just mostly the same as do notation in ...
11
votes
8answers
482 views

How does a variable introduce state?

I was reading the "C++ Coding Standards" and this line was there: Variables introduce state, and you should have to deal with as little state as possible, with lifetimes as short as possible. ...
26
votes
3answers
20k views

Sets Data Structure in Golang

I really like google golang but could some one explain what the rationale is for the implementors having left out a basic data structure such as sets from the standard library?
122
votes
13answers
14k views

Why are statements in many programming languages terminated by semicolons?

Is there a reason that a semi-colon was chosen as a line terminator instead of a different symbol? I want to know the history behind this decision, and hope the answers will lead to insights that may ...
5
votes
4answers
1k views

Why are scientific programming languages so weird? [closed]

It seems to me that programming languages meant for use in science and engineering are consistently weird compared to general-purpose languages. Some examples off the top of my head: In Matlab, each ...
17
votes
3answers
849 views

What is benefit that a compiler is implemented in the same language it compiles? [duplicate]

I've seen it's very common for a compiler to be made in the language it's compiling. What is the benefit of this? Seems like it makes the process for outsiders (and the developers for a while) more ...
72
votes
18answers
15k views

Why is verbosity bad for a programming language? [closed]

I have seen many people around complaining about verbosity in programming languages. I find that, within some bounds, the more verbose a programming language is, the better it is to understand. I ...
18
votes
5answers
3k 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 ...
19
votes
4answers
15k views

Why is Prolog good for AI programming? [closed]

I am researching programming languages used for AI programming. I know that LISP is taught as an AI programming language in my university, but Prolog rarely is. I am kind of fond of Prolog, but I'm ...
-2
votes
1answer
98 views

How do I create my own Objective-C to Swift converter? [closed]

I'm really interested in writing my own converter. I know C++/Python/Objective-C/Swift and a little Haskell. There are website like objectivec2swift and iswift.org, which can convert OC to Swift ...
7
votes
2answers
605 views

Programming languages, positional languages and natural languages

Some programming languages are modeled on machine code, like assembly languages. Other languages are modeled on a natural language, the English language. Others are not modeled on either machine code ...
-3
votes
1answer
66 views

What comes first: choice of language or choice of libraries? [closed]

You're starting a new project. You and your team are fluent enough in a number of programming languages. You begin the design phase. What should be discussed first: the language of choice, or the ...
27
votes
15answers
2k views

Is there a language out there in which parameters are placed inside method name? [closed]

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

Has any language ever supported a conditional assignment target? [closed]

I've never seen a programming language with conditional assignment targets, eg.: // If (x == y), then var1 will be set to 1, else var2 will be set to 1 ((x == y) ? var1 : var2) = 1 The target of ...
10
votes
5answers
810 views

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

Is it compulsory to have an Android device to learn programming for Android ? Currently, Java is my primary programming language.
0
votes
3answers
164 views

What really is the “runtime environment”?

This is a very basic question but is something I've never completely understood and recently, when studying .NET Core and ASP.NET 5 I felt the need of a more complete understanding of the topic. ...
33
votes
2answers
2k 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 ...
38
votes
7answers
6k views

Is there a reason to have a bottom type in a programming language?

A bottom type is a construct primarily appearing in mathematical type theory. It is also called the empty type. It is a type that has no values, but is a subtype of all types. If a function's return ...
2
votes
2answers
6k 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 ...
276
votes
4answers
100k views

What software programming languages were used by the Soviet Union's space program?

I got interested in the Soviet space program and was interested to discover that the software on the Buran spacecraft circa 1988 was written in Prolog. Does anyone know what languages might have ...
8
votes
3answers
438 views

Would it be better to have extra checks, or would it be a waste of time? [duplicate]

In your opinion, do you think it is a waste of time to make checks that you know there is no possible way of it being there/not being there, or would you just put it there just in case there is a bug ...
2
votes
2answers
136 views

Private variables and the old FORTRAN common blocks [closed]

This is a question that perplexes me about object oriented programming. In some OOP languages (e.g. C++) a member function can access private variables of the class without restriction. That means ...
-1
votes
1answer
157 views

Is C programming language low level or high level? [duplicate]

What do you think, is C programming language low or high level? There are some information, in one is said that C is low level, and another C is high level? When I read book of Dennis Ritchie and ...
23
votes
4answers
866 views

C++ Linkage Languages other than C?

The C++ language allows intermixing of both C++ and C in one source file. For example, extern "C" { struct bar { /* ... */ } } Does C++ or has it ever supported any other "linkage languages" ...
143
votes
26answers
15k views

Is constantly looking for code examples a sign of a bad developer? [closed]

I am a CS student with several years of experience in C and C++, and for the last few years I've been constantly working with Java/Objective C doing app development and now I have switched to web ...
-3
votes
1answer
182 views

Designing a programming language, seeking simple and logical parameter behavior [closed]

I am designing a programming language, and would want to make it as simple as possible, conforming to layman's logic. I've been using many programming languages, although the last few years I've been ...
6
votes
3answers
521 views

Is there a difference between iterable and enumerable?

Many languages seem to have structures that are very similar called iterable or enumerable. These are structures that can be iterated or enumerated over, which seem to me extremely similar things. ...
2
votes
3answers
322 views

Why do most language's definition of substring allow substring(“abc”, 3) => “”

I've seen most languages have it be the case for their substring method that using the length of a given string in the method as the start index will give you an empty string. It is most definitely ...
9
votes
8answers
2k views

Why are self-hosting compilers considered a rite of passage for new languages?

I've heard in a number of places now that people expect languages to use, or at least have, a self-hosting compiler in order to deserve respect. I'm curious as to why this is. A compiler seems like a ...