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
1answer
1k views

Matrix Pattern Recognition Algorithm for a 2D space

I have a picture that I elaborate with my program to obtain a list of coordinates. There is a matrix represented in the image. In an ideal test I would get only the sixteen central points of each ...
1
vote
2answers
211 views

Where is interface between button click and event raising defined

When I click on button, might be in windows apps, web apps, etc it has some animation to actually see it clicked and event is raised in background. I've knowledge of events and its attaching to button ...
5
votes
3answers
186 views

Are there languages that expand on the STL's iterator types? [closed]

Many languages use the concept of an iterator. The c++ STL expands on this with input iterators, output iterators, forward, bidirectional, random access and others. As far as I know, these ...
3
votes
2answers
427 views

How much inconsistency arises from Javascript's high flexibility?

I'll admit it, I haven't yet mastered the language, but my experience with it tells me that Javascript is a highly flexible language, allowing prototypal inheritance, dynamic typing, functions as ...
7
votes
3answers
1k views

How is referential transparency enforced?

In FP languages, calling a function with the same parameters over and over again returns the same result over and over again (i.e. referential transparency). But a function like this (pseudo-code): ...
1
vote
1answer
334 views

“Generators are function derivatives”

I am reading this article on a new feature of ECMAscript 6, generators, that are landing in the V8 JavaScript interpreter. Not too far from the top, the author suggests an analogy: generators are ...
5
votes
3answers
5k views

Whatever happened to Pascal? [duplicate]

In reading this blog post about Photoshop 1.0 I was surprised to learn that it was written in Pascal (Object Pascal to be exact). But you never hear about Pascal anymore. Why is that?
4
votes
3answers
591 views

How To Become More Comfortable with the Technical Terms

I have been working freelance for a few years, and before that I worked as an entry-level coder for a non-technical company. I "understand" how delegates, and MVC, and how to make an app and make it ...
6
votes
5answers
2k views

Spoiled by Python convenience- and productivity-wise, spoiled by C++ speed-wise. Now unhappy with both [closed]

I'm currenetly struggling with choosing how to proceed as a programmer. I mainly programmed games and would like to continue. And for about 5 years or so I just used C++ and OpenGL, so I spent a lot ...
1
vote
4answers
449 views

Should code and data be treated seperately?

Is it really necessary to differentiate between code and data ? Is there any language where such differentiation is not there ?
0
votes
2answers
402 views

How the cross programming language compiler or translator works [closed]

These days there are more cross programming language compilers (specially from some 'X' language to JavaScript). I wonder how these are developed? What are the general steps to be taken care to write ...
4
votes
6answers
582 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 ...
1
vote
1answer
2k views

What is the difference between a procedure-oriented and a problem-oriented programming language?

This is one of the questions given to us an assignment and I've tried to search for this on the internet but didn't get the required answers. Would be great if examples are provided too :)
8
votes
2answers
2k 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 ...
13
votes
9answers
17k views

Why do we need “callback functions”?

I am reading the book programming in Lua. It said that Closures provide a valuable tool in many contexts. As we have seen, they are useful as arguments to higher-order functions such as sort. ...
13
votes
2answers
2k views

How is Nothing a subtype of every other type in Scala

I am taking Martin Odersky's coursera course on functional programming with scala, and for now I have learned two things that together don't make sense: Scala doesn't support multiple inheritance ...
11
votes
2answers
11k views

Why is C so high in TIOBE index of popularity, while C++ is just under here too, but not as popular? [closed]

I can't get my head around this. If C is so much used, but C is not C++, can someone explain to me the most important reasons that makes C more used than C++ ? Where is all this C code written for ? ...
48
votes
7answers
7k views

Why are semicolons and commas interchanged in for loops?

In many languages (a wide list, from C to JavaScript): commas , separate arguments (e.g. func(a, b, c)), while semicolons ; separate sequential instructions (e.g. instruction1; instruction2; ...
2
votes
1answer
241 views

How would I programmatically verify gift cards on a website?

I'm trying to include a feature on my website that verifies retail gift card balances on cards previously registered at the retailer's website by the card holder. Can this simply be done by writing an ...
6
votes
6answers
8k views

Is there any difference between interfaces and abstract classes that have abstract methods only?

Let's say we have an abstract class and let this class has only abstract methods. Is this abstract class different from an interface that has same methods only? What I am looking to know is if there ...
7
votes
5answers
17k views

Is there any difference between pointers and references? [duplicate]

References and pointers do the same thing as I know. Is there any difference between them? If there is no difference, why we call them reference not pointer?
21
votes
6answers
2k views

How can I say that programming language compiles to other languages?

How can I say in english, that programming language can be compiled to other programming languages? The example can be Haxe. On the website the language is decribed as "Multiplatform": ...
69
votes
11answers
26k 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 ...
28
votes
5answers
11k views

Is a lambda expression something more than an anonymous inner class with a single method?

There is a new hype with the long awaited lambda expressions in Java 8; every 3 day another article appears with them about how cool they are. As far as I have understood a lambda expression is ...
13
votes
3answers
4k views

Are there any statically-typed Web scripting languages?

There seems to be two major ways to set up a web server backend. You can use a LAMP stack, with the server-side code in something like PHP or Python (or Ruby or JavaScript, which don't start with a P....
6
votes
3answers
1k views

Why do some of object oriented languages let programmer use primitive types?

Why do some object oriented languages let the programmer use primitive data types? Aren't classes like Integer, Boolean, etc. enough?
1
vote
4answers
4k views

What language is most similar to JavaScript? [closed]

I am looking for a language that has First class functions is dynamic has prototypical inheritance does not have too many features (i.e is easy to get into and write first program). I have been ...
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 ...
45
votes
8answers
10k 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 ...
8
votes
1answer
1k views

Are “normal order” and “call-by-name” the same thing?

I was studying the book Structure and Interpretation of Computer Programs and in section 1.1.5 The Substitution Model for Procedure Application the author explains the concepts of normal order and ...
2
votes
8answers
2k views

Benefits of combining programming languages [closed]

I know there are different ways to combine programming languages (Haskell's FFI, Boost with C++ and Python, etc...). I have an odd interest in combining programming languages; however, I have only ...
51
votes
14answers
6k views

Keep a programming language backwards compatible vs. fixing its flaws

First, some context (stuff that most of you know anyway): Every popular programming language has a clear evolution, most of the time marked by its version: you have Java 5, 6, 7 etc., PHP 5.1, 5.2, 5....
3
votes
4answers
2k views

Why many programming languages have only 2 data-structures: arrays and hashes?

Many programming languages have only those 2 structures, and even some languages that have more structures still only provide special syntax for those 2; usually, [] and {}. Why is this? Is there ...
6
votes
2answers
1k views

Alternative Scripting Language to Lua? [closed]

I would like to add scripting support to an applications and with plenty scripting languages available I am a bit overwhelmed. At first I thought about Python but I guess Python is a little too big ...
0
votes
1answer
168 views

How does public API designer come to the conclusion what shall be provided for future and what not?

Often working with various jars and exploring the features specially in corner cases, I often realize and think that how is that they thought that it might be a useful scenario somewhere in future ...
0
votes
2answers
130 views

Language design suggestion on database query [closed]

I am designing a new programming language. I am designing a syntax to implement queries. Currently this is how it works. The database is accessible through entity object. on this sample I have "...
2
votes
2answers
21k views

What is the maximum value of index of an ArrayList?

I was thinking about it. You may have access to endless memory (one computer with lot of RAM) so that you can keep on adding more and more elements to your ArrayList. But, I think that you can only ...
1
vote
1answer
265 views

Do Flexibility and Inconsistency,Unsafety Overlap?

I was lately doing some research about different programming languages. I was interested particularly to learn unique features of popular programming languages and situations where these assets shine. ...
2
votes
2answers
406 views

I need some help with defining a shell syntax

I'm trying to understand more about shells. I'm looking to implement one and want to look at what's been done in the past. In a regular shell, you have features like aliases and relative paths, and ...
5
votes
2answers
377 views

What API is required for code completion/syntax highlighting/similar IDE features?

I've been developing a little language in my own time, and I've got a fairly bare-bones prototype that implements some of the most basic features. Now I'm looking at scaling up, and I don't want to ...
4
votes
3answers
1k views

What's the best programming language to learn for solving partial differential equations?

I have to create a program that compares two or three different methods (FEM FVM FDM) for solving an easy pde. Is there a program language in which I could do this easily? (i need to operate with ...
34
votes
8answers
3k 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 ...
3
votes
2answers
369 views

What are some JavaScript selectors? [closed]

I was at an interview recently and although they knew that I was a beginner in javascript they asked me what selectors I used before? I didn't know what to say. I came back home and searched for it ...
4
votes
2answers
387 views

Do any LOP languages exist?

I have read a few of the articles related to the Language Oriented Programming paradigm. Therefore, I concluded that LOP paradigm can let programmers be more productive because of it's extensibility. ...
10
votes
3answers
279 views

Can we make it easier to add data flows between distant parts of a large codebase?

When making changes to large systems, I often face the problem that some piece of functionality needs to get some data from another piece, but they're in different parts of a deep and branching call ...
83
votes
3answers
34k views

Why do programming languages, especially C, use curly braces and not square ones?

The definition of "C-Style language" can practically be simplified down to "uses curly braces ({})." Why do we use that particular character (and why not something more reasonable, like [], which ...
26
votes
8answers
17k views

Why do large websites use different languages for the backend and frontend?

My understanding from small MVC applications is that you have the front end, which deals with HTML, JS, jQuery, etc, and you have the back end, which consists of your controllers and models. However,...
-1
votes
4answers
708 views

Is is acceptable to create mediocre code now in preparation for new language features? [closed]

I'll be specific: Java 8 is promised to bring lambda expressions as well as method and constructor references among other things. As a Java developer I'm super psyched about that. In my day to day ...
2
votes
8answers
5k 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 ...
4
votes
5answers
575 views

What's the effect of this assignment (whatever the language)?

I think my book (Programming Languages: Principles and Paradigms) is wrong. a is a vector, assume a C-like language: b = 0; a[f(3)] = a[f(3)] + 1; int f(int n) { if(b == 0) { b = 1; ...