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

45
votes
7answers
3k 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; ...
1
vote
1answer
173 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 ...
5
votes
6answers
3k 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 ...
5
votes
5answers
3k 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
1k 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": ...
33
votes
9answers
10k 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, I need to create new instance of String. What might be the reason of ...
7
votes
4answers
2k 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 they a lambda expression is ...
9
votes
3answers
1k 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 ...
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?
0
votes
4answers
725 views

What language is most similar to JavaScript?

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
2k 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 ...
40
votes
6answers
4k 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 ...
9
votes
1answer
562 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
679 views

Benefits of combining programming languages

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 ...
37
votes
12answers
3k 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, ...
3
votes
4answers
1k 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 ...
5
votes
2answers
669 views

Began with iOS development, skipped CS, and getting hit hard at interviews? [duplicate]

I'll start with a brief background: my degree is in Recording Arts, so mainly audio engineering and stuff relating to the music industry, with some synthesis and stuff which was my link into coding ...
5
votes
2answers
628 views

Alternative Scripting Language to Lua?

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
159 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 ...
1
vote
2answers
120 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 ...
0
votes
2answers
2k 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
259 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
391 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 ...
-4
votes
4answers
692 views

Are there any programming languages understood by all operating systems, if so what? [closed]

I'm curious if there's a programming language that you can write code for all operating systems in, and if so what language that might be? I'm guessing something very low-level like Binary could do ...
5
votes
2answers
228 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 ...
3
votes
3answers
461 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 ...
35
votes
8answers
2k 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
313 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 ...
-2
votes
2answers
218 views

What topics/abilities are critical to learning a programming language? [closed]

What topics/abilities are generally accepted as vital-to-know of any programming language? (Can be answered through either language-specific or non-specific suggestions, however) For example, I ...
4
votes
2answers
368 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. ...
9
votes
3answers
266 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 ...
64
votes
3answers
21k 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
7k 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. ...
-1
votes
4answers
633 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 ...
5
votes
4answers
722 views

Is it possible to create a 2d game for both linux and windows with next to no changes?

I'm starting a project with friends which would preferably reach both audiences of windows and linux. The only problem is that none of us have any experience of linux porting or linux coding any way. ...
1
vote
8answers
2k views

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

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 ...
5
votes
5answers
563 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; ...
8
votes
1answer
317 views

Why is the main memory for object allocation called the 'heap'?

Has anybody got an idea why the area of main memory where objects are allocated is referred to as the heap. I can understand the rationale for that of the stack LIFO but would like to know what the ...
1
vote
1answer
184 views

A new language's chances [duplicate]

I am creating a new language, with some nice features like OOP, static typing, imperative, etc. The main reason for making a language was to learn more about compiler construction. My question is, ...
0
votes
3answers
275 views

C/C++ in applications that do not concern performance [closed]

C is the best language (or maybe the single language) suitable for operating systems, drivers, embedded systems etc. For more complex domains like computer graphics C++ is a better choice. But these ...
33
votes
3answers
2k views

Why are actual parameters called “arguments”?

Where does the word "argument" (in the programming sense) come from? i.e. Why are actual parameters called "arguments"? The meanings don't seem related, and I haven't found any explanation of it ...
-1
votes
2answers
244 views

What to learn and how? [closed]

I am a Java (Web) Developer. Having knowledge about c#, PHP and Ruby. I am getting confused how to keep myself updated with very fast changing the programming language and their implementation. Like, ...
0
votes
1answer
100 views

More info about Poplar language originiating from Xerox Parc [closed]

Peter Weinberger in an interiview mentioned a language called Poplar What’s interesting is that at the same time that we were doing AWK, there was a project at Xerox PARC called Poplar … maybe ...
-1
votes
3answers
319 views

How can I get assembly from an EXE? [closed]

Pretty much my only question is the title. Other then that I want to see the code behind small EXEs but I know it's hard to get it to convert to something like c or c++ so why not get assembly.
7
votes
2answers
412 views

What's a good math textbook to have on my desk while studying Haskell? [closed]

I just started learning Haskell and it seems like you can't get too far in the language without being comfortable ( or at least exposed ) to certain branches of mathematics. Unfortunately I have major ...
8
votes
1answer
337 views

Math library methods in Google's Go Programming Language

I have been programming in google Golang and have been enjoying it due to its brevity but I find it surprising that almost all its Math standard library methods are for the floating point type. Is ...
0
votes
2answers
258 views

Need some advice and feedback on my code's design

I am looking for feedback on the design of my program. I have a shell script call function.sh that defines a lot of helper functions. My intent is to use those bash functions defined in functions.sh ...
13
votes
4answers
334 views

Fernando J. Corbató's “Constrained languages”

For his 1990 Turing award speech, Fernando J. Corbató listed reasons why complex systems will inevitably fail. In his conclusion, he gives some suggestions for decreasing the probability of failure. ...
2
votes
2answers
299 views

How to fix bad fundamentals? [closed]

I am a native PHP developer, and have been for about a year or so. I love PHP and it was very easy for me to learn, but I have developed some bad habits along the way due to never having a formal ...
29
votes
2answers
2k views

Why is a Boolean value stored as a byte inside of a computer when it only requires one bit

I recently started learning to write code, and in my book I came across this question. "Why is a Boolean value stored as a byte inside of a computer when it only requires one bit?" can someone shed ...