Tagged Questions

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

0
votes
0answers
39 views

Developing a “time scheduler” app [duplicate]

I need to develop an application to generate, given a set of preferences and constraints, a time schedule for employees. These tables can really get complex and they might need to take into account ...
0
votes
0answers
95 views

Language Extension via special comments [on hold]

Sometimes a language extension is created, by having the comments specially marked, to run extension operations. An example I ran into recently: in the Berkley SPICE netlist language for describing ...
0
votes
0answers
38 views

Programming Language Classification by parser type / grammar [on hold]

I've read some articles on code parsing recently. This had opened a question that I cannot find answer on: is there a classification of programming languages according to their grammar and parsing ...
-1
votes
3answers
233 views

What is meant by Open Source Programming Language? [on hold]

What does it mean when we say that it is an open source programming language? I mean is it the implementation (compiler/runtime) of the language which can be open or close in nature or something else. ...
-2
votes
0answers
79 views

Programming languages characteristics summary table [closed]

There are programming languages that require to declare type of variable at the left-hand side, also there're programming languages that require to declare type of variable at the right-hand side of ...
0
votes
0answers
83 views

How increment ++ really works and how to adapt it to exclude an invalidity? [migrated]

The context: As part of a class project, I created this code (Original Version). It works great, had almost full grade. As I was learning new materials, I challenge myself to rewrite the original ...
-4
votes
1answer
93 views

Eliminating choices of programming languages? [closed]

There are a number of programming languages available today. My question is given a specific job what is the criteria one should use to eliminate other programming language choices which serve the ...
-4
votes
0answers
59 views

Post increment operator when used in printf and otherwise [closed]

please explain these two tiny pieces of code in C language: Program1: #include<stdio.h> #include<conio.h> main(){ int i; clrscr(); i=i++*i++*i++; printf("%d",i); getch(); } ...
-3
votes
0answers
54 views

Graphic Designer / Programmer Jobs? [closed]

Are there any jobs out there that require you to be a graphic designer and a programmer? I have been a programmer for 2 years now (it kind of happened by accident, but I'm starting to become 'okay' at ...
0
votes
1answer
108 views

What to do if a feature is not supported natively on a platform? [closed]

If a feature is not supported on a platform natively what would a programmer do? For example, when building an iphone app, if you are trying to slide a picture(just as an example- I know you can slide ...
6
votes
2answers
560 views

What is the relationship between lambda calculus and programming languages? [closed]

I am starting my first year (in college) in Computer Science next year and I write mostly in C (if that is to matter). I have tried searching but most of what I find assumes knowledge of lambda ...
-5
votes
1answer
99 views

How can I start making a programming language? [duplicate]

my question is this; How do I start making a programming language? By this I mean not an interpreted language, but I want to know how do I start from the machine code and work up, like the first ...
1
vote
3answers
423 views

Is it possible to have a dynamically typed language without duck typing? [closed]

This question has been asked here, but received poor answers and didn't clarify the issue. I believe it justifies asking it again. I understand that you can have duck typing with either dynamically ...
0
votes
0answers
60 views

Best way to handle language interoperability

Background In a language like F#, direct interoperability with most other .NET languages is possible. For example, it is possible to use classes written in C# directly in F#, and it is possible to ...
0
votes
1answer
100 views

Order of Operations Annoyance [duplicate]

In most programming languages (C#, JavaScript, Java) the order of operations precedence has that equality comparison come BEFORE bitwise comparisons. This means that if you have a bit operation and ...
21
votes
4answers
3k views

Choosing a Programming Language Systematically [closed]

I am looking for a methodology for choosing a language. I am not asking for opinions about languages. I have been tasked with the process of comparing our shop's current language with others that are ...
3
votes
2answers
379 views

Are there any OO languages without inheritance?

During a code review today, a colleague of mine said something interesting: prototype is only useful when you need inheritance - and when's inheritance ever a good idea? I thought about this and ...
5
votes
4answers
467 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 ...
1
vote
1answer
251 views

Which programming language first came up with the finally block?

Which programming language first came up with the finally block? I ask purely out of curiosity. It is a very useful piece of syntactic sugar, and whoever first created it surely has a very ...
18
votes
5answers
2k views

Why is type inference useful?

I read code way more often than I write code, and I'm assuming that most of the programmers working on industrial software do this. The advantage of type inference I assume is less verbosity and less ...
2
votes
1answer
296 views

Do compilers un-inline recurrent expressions?

Does a compiler look for recurrent expressions to convert it into 'function' to reduce binary size and improve performance? Of course, the obvious answer might be "some do it, some don't", so I ask ...
2
votes
2answers
521 views

What is the difference between if('' == $variable) and if($variable == '') [duplicate]

While using an 'if' statement to check whether a variable is an empty string or not we can write it in two ways i.e. if('' == $variable) and if($variable == ''). I want to know what is the impact of ...
0
votes
1answer
128 views

Static typing vs. dynamic typing [closed]

I'm developing my own programming language in my spare time as a hobby. It's an interpreted language. Currently the syntax for variables is this: %<variable> = <value> Here are some ...
0
votes
1answer
93 views

What are factors to take into consideration in choosing a programming language/paradigm for a rule-based natural-language translation program?

I have experience with object-oriented programming languages (C++ and Java), but I am wondering what kinds of programming languages — including OOP languages– or programming paradigms might be ...
0
votes
2answers
120 views

Finding metrics for development time in different languages [closed]

I'm trying to determine if a language I'm investigating (Groovy) is better for developing enterprise applications than our current language (Java). Specifically I'm trying to figure out if it will ...
3
votes
2answers
116 views

What is the extent of programming language localization dialects?

Apple's scripting language AppleScript was designed with localization in mind; allowing the language to be represented in multiple dialects resembling languages from around the world. In this way, ...
2
votes
3answers
204 views

Find all possible subarrays of an Array

I am lost I just can't seem to get my head around backtracking/recursion approaches. I understand how simple recursion problems like factorials work I can even trace those by hand. But when it comes ...
0
votes
3answers
240 views

How should I “dig deeper” as a web developer? [closed]

I am currently a full-stack web developer working mainly in Ruby/Rails/Javascript. The languages I use on a daily basis (ruby, css, javascript, php) are great, but they are very dynamic, high level ...
1
vote
3answers
193 views

How to abide the “allocate in caller” rule when the size is computed in the callee?

Let's say we have an opaque type handle_t that is managed through a simple interface with functions such as: handle_t *handle_init(void); int handle_do(handle_t *); void handle_free(handle_t *); ...
6
votes
2answers
382 views

In layman's terms, what is left recursion?

According to one page on code.google.com, "left recursion" is defined as follows: Left recursion just refers to any recursive nonterminal that, when it produces a sentential form containing ...
2
votes
2answers
171 views

What properties does an object oriented language have? [closed]

I'm currently working on a game and wanted to add some scripting support. Due to trying to keep the entire codebase in managed c# (Excluding Monogame), I am using a custom language for the scripting ...
2
votes
4answers
503 views

Why aren't we building and using parallel processors *meant* for general computation?

We all know GPUs are much faster than CPUs for a wide range of applications. When someone asks why we are not just programming for GPUs at all, one of the most common answers is that GPUs are not good ...
3
votes
7answers
189 views

What if any languages treat undisposed resources as an error?

I've seen lots of code like the following example. It's in Python, but the same mistake is made in all languages with managed resources: f = open('foo.txt', 'rb') for line in f: print line That's ...
22
votes
5answers
1k views

What specifically does expressive power refer to?

Expressive Power is defined by Wikipedia as: .. the breadth of ideas that can be represented and communicated in that language. Does "ideas" refer to the things (operations, structures, ...
1
vote
3answers
311 views

From a technical point of view, could JavaScript be compiled instead of interpreted?

The question title speaks for itself. I'm specifically thinking in terms of a Node.js server. Additionally, this question is assuming that you don't need eval(). Also, if this is not possible, why ...
4
votes
4answers
625 views

How does Python compile some its code in C?

I read that some constructs of Python are more efficient because they are compiled in C. https://wiki.python.org/moin/PythonSpeed/PerformanceTips Some of the examples used were map() and filter(). I ...
2
votes
5answers
260 views

Do first-class methods exist?

Okay, I know first-class functions are cool, closures even better, etc. But is there any language with first-class methods? In my mind, I see a first-class method as an "object" that has both a ...
1
vote
2answers
159 views

If there's no problem treating a statement as an expression, why was there a distinction in the first place in some programming languages? [duplicate]

Why do we have the distinction between statements and expressions in most programming languages? For example, in Java, assuming f and g return ints, this still won't compile because it's a statement ...
1
vote
4answers
162 views

What would you call the concept of CofeeScript or Sass to be? [duplicate]

There is this rising trend with web development of making new pseudo languages to extend the functionality of JavaScript, CSS and HTML given that those are static and their metamorphosis or evolution ...
31
votes
5answers
2k views

What does “context-free” mean in the term “context-free grammar”?

Given the amount of material that tries to explain what a context-free grammar (CFG) is, I found it surprising that very few (in my sample, less than 1 in 20) give an explanation on why such grammars ...
1
vote
2answers
198 views

How do you guard against hidden overflows

consider the following: (i+j)/2 i and j are both 32 bit integers and the result should also be. But in the little equation, there's a hidden overflow, i+j could become larger then a 32 bit integer ...
1
vote
3answers
70 views

Property-level value transformation for indirect object casting

Does any programming language exist to support the explicit, property-level object copy? For example, assume this code: public class Student { public string Name { get; set; } public ...
1
vote
1answer
142 views

Hardware-control on one computer. But how about several?

For a while I have been pondering the question of, given a standard interface specification, whether there is a way to allow multiple programs to control multiple hardware devices across the network. ...
-3
votes
1answer
313 views

Why is the JavaScript-language different in different programs/sites? [closed]

I'm kind of new to programming and i have a question that's been bothering me for awhile. Why is the JavaScript-language different in different programs/sites. I've used Codecademy to practice and ...
4
votes
1answer
170 views

How should I recursively process a file in Haskell?

Basically I'm expanding a literate program in Haskell. There are two things I need to look for to expand. Here's an example file: program.c.lit: ============== Some comments in the source file that I ...
4
votes
4answers
315 views

Which language introduced the idea of private (hidden) variables? [duplicate]

I know C++ had private variables inside classes, and Java, C#, Javascript, and others picked up on that and ran with it. Aside from variable scope, most languages before that just made everything ...
1
vote
1answer
124 views

what is a language specification?

Either I am being a total n00b or just not with it today but I have been reading a few blogs lately and they talk about language specs. What actually is a language spec? Is php.net a language spec? ...
5
votes
3answers
265 views

Declaring variables in Python and PHP

The question is how to cope with absence of variable declaration in Python, PHP, and the like. In most languages there is a way to let the compiler know whether I introduce a new variable or refer to ...
11
votes
11answers
3k views

Can a closed-source programming language survive? [closed]

A friend has written a programming language. It has a syntax reminiscent of SGML. He has written an interpreter for it, and an IDE. He and his colleagues use it in-house as a server-side language. It ...
3
votes
5answers
885 views

Does this kind of programming language exist?

I'm thinking about creating my own pet programming language, and I have been wondering if similar language already exists. The basic idea is that the language itself would be dynamically typed with ...