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

-2
votes
1answer
69 views

Crawler - programming language choice [on hold]

I'm currently developing a web crawler. The first version was developed in Node.js and runs pretty well. The issues that I encountered with Node.js are in no particular order: slow URL and ...
3
votes
1answer
97 views

What is the minimum practical definition for the Scheme language?

What is the smallest practical set of primitives that can be used to define the Scheme language? For example, map can be defined as (define (map proc lis) (cond ((null? lis) '()) ...
-2
votes
1answer
101 views

Question about switch-case statement [on hold]

What happens, and does code work properly if we write switch-case structure like this, why its not good to write code like this? I'm porting some firmware and have switch-case statement interrupted ...
1
vote
1answer
68 views

Equivalent translation of Asynchronous behaviour in C

As a follow-up to my other question, if one were to build a general-purpose translator from a language that has support (be it with an external library or otherwise) for asynchronous behaviour to a ...
1
vote
2answers
55 views

Passing context around AST nodes

I have various objects inside my AST, such as IfBlock, FunctionBlock, LogicExpression, etc. All of those objects share a context, which is basically a hashmap with some variables. It's a very simple ...
-1
votes
0answers
61 views

Is there a language or platform for running objects in a database [closed]

I've been experimenting with MongoDB. I like the way it works--documents represented by JSON objects. Now I'm looking for something different--I'd like to store active, running, JavaScript objects in ...
0
votes
1answer
50 views

Writing a parser on top of an XML-based AST: am i doing it right?

I have a sort of AST defined in XML that i'm trying to parse and evaluate. The XML tree contains the tokens and all the information i need. However, i'm finding it difficult to do it "properly". ...
0
votes
5answers
456 views

Is String processing more complex than number processing in programming languages?

I feel that string processing is always more complex than Numbers or mathematical processing. Are our programming languages are designed this way that mathematical operations are pretty much straight ...
2
votes
1answer
159 views

Advantages of having numeric data types as classes rather than primitives [closed]

I was wondering about why some languages choose to implement numeric types (boolean, integers, floats, characters etc.) as classes/objects (eg. Kotlin) and some as primitive types (eg. Java). I am ...
45
votes
6answers
5k views

Explanation of how server-side programming languages are accessed

It is my understanding that any general-purpose programming language can be used for server-side development of a website. Am I right in thinking that a server just needs some kind of interface such ...
3
votes
2answers
117 views

Asking about learning experience while working for outsourcing company [closed]

i come up with this question because i feel frustrated to learn new things. When i learn new technologies i can remember it for a short time then if i can't apply to the work i almost forget it. For ...
3
votes
2answers
251 views

Why was the AT&T assembly syntax designed this way?

The AT&T assembly syntax, often called the GAS syntax, keeps surprising me. For example, its parameter order: mov $100,%eax /* Destination after source */ This just seems so counter-intuitive! ...
1
vote
1answer
82 views

What is VLA and how it is implemented?

Most languages does support variable length arrays on the heap but I've heard that those can be stored on the stack too. I'm curios what languages support this construct, some examples and how are ...
0
votes
1answer
71 views

Pass by value result with exceptions [closed]

I have a doubt with the pass-by-value-result method. As far as I understood, it passess the value of the parameter to the function, and then get the result as the function ends. But what happens with ...
-1
votes
0answers
32 views

int differers in level of indirection from char error [migrated]

The code is from Absolute beginner's guide to C, and I get this error ./BlackJack.c<41> : warning C4047: '==' : 'int' differes in levels of indirection from 'char [2]' when I try to compile it ...
-4
votes
1answer
79 views

I want to make a program but I'm having difficulties in learning related technology for the project [closed]

I'm 14 and I love computers & programming. I've been studying programming on my own for about a year. When I first started with studying the C programming language, I studied and practiced very ...
0
votes
2answers
221 views

Why does Java (and other langs too) have seemingly redundant functions like “str.startsWith(String str, int fromOffset)”?

I was wondering why Java and other programming languages implement (seemingly) redundant functions such as: "foobar".startsWith("bar", 3); // same as "foobar".substring(3).startsWith("bar"); // or ...
0
votes
0answers
75 views

difference between generics and interfaces [duplicate]

Are there any advantages of using generic type constraints over an interface? For example: T whatever<T>() where T is IInterface; vs IInterface whatever(); My guess is it's just a ...
1
vote
1answer
168 views

Different Implemenations of Tail Call Optimisation

I've heard some people in my university discuss the tail call optimisation in ML as if it were a special version tail call optimisation. Does the ML (SML/F#) implementations of tco in these languages ...
7
votes
5answers
884 views

Why are objects instantiated this way?

Some times I see an object instantiated this way. ICustomer oCustomer = new Customer Obvious but the Customer class is implementing ICustomer interface in this example. Are there any advantages of ...
2
votes
2answers
83 views

Managing scaffolding for debug vs production builds

The more I program the more I realize that most of my time is spent writing scaffolding for programs so that I can debug them and then strip away the scaffolding for production. The problem is that ...
32
votes
8answers
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 ...
1
vote
3answers
332 views

How are basic functions implemented in a programming language if they are not built in? [closed]

The lowest levels of a programming language's library functions are always obscure and often have no code that looks like it even remotely does anything. Some languages have these functions like ...
11
votes
2answers
303 views

Is higher-rank parametric polymorphism useful?

I'm pretty sure everyone is familiar with generic methods of the form: T DoSomething<T>(T item) This function is also called parametrically polymorphic (PP), specifically rank-1 PP. Let's ...
12
votes
1answer
446 views

Why do you need higher kinds?

Some languages allow for classes and functions with type parameters (such as List<T> where T may be an arbitrary type). For example, you can have a function like: List<S> Function<S, ...
-2
votes
4answers
236 views

Why is there no Swap command? [closed]

In many programming languages, I see programmers always struggle to swap 2 variabeles. Most of the time it costs 3 copies and a temporary variabele to accomplish it. Why do programming language dont ...
8
votes
2answers
509 views

Why did programming languages start using = for assignment?

In most early algorithms books, <- referred to assignment and = referred to comparison. But nowadays the only languages that don't use = for assignment are Pascal (:=) and toy languages like COOL. ...
35
votes
9answers
12k views

Why do schools teach arrays over List? [closed]

Most of the assignments in my school for the initial programming classes required me to use arrays. I work full time now, and I never used an array for any project that I have worked on. Even in the ...
-1
votes
1answer
62 views

What is the easiest way to store a piece of text in an HTML page? [closed]

I'll say in advance - I have almost no experience with HTML. I am currently coding a game in Lua, which needs to access a piece of code from an HTML website using GET. My question is this: What is ...
0
votes
2answers
200 views

Is there any plan to take out “features” from next versions of javascript? [closed]

I'm looking to learn javascript (now for real) and I've had a look on the latest version of ES6 which is supposed to be frozen in terms of features set. It seems to be the pretty much same as ES5 ...
0
votes
2answers
54 views

comparison of computer processing language vs protocol

how can explain the diference between programming languge and protocol?, can protocol have extension? we know that machines communicate with protocol, but they can also do so with expressive ...
1
vote
3answers
240 views

Differences between Instruction set (architecture) and machine language?

Tanenbaum's Structured Computer Organization says: Every computer has an ISA (Instruction Set Architecture), which is a set of registers, instructions, and other features visible to its ...
-1
votes
2answers
202 views

Is functional language without runtime written in C possible?

Every functional language that compiles to native code relies on quite big runtime written in C programming language (well at least ones that I know of, for example Haskell, OCaml, Gambit/Chicken ...
-3
votes
1answer
84 views

If I want write a programming language, what I have to know? [closed]

I think about to take this course on coursera: https://www.coursera.org/course/compilers What knowledge I absolutely have to have in order to succeeded in this class? In particularly I'd like to ...
9
votes
7answers
2k views

Does Oracle reap economic benefits by maintaining Java? [closed]

It occurred to me that many programming languages such as Python and Javascript are maintained by non-profit foundations. I can see why a foundation would update a free programming language- in order ...
0
votes
2answers
165 views

How are declarative languages executed by a computer?

I'm getting introduced to declarative languages and am beginning to love them. In particular Haskell, a functional language, is very expressive, easy to debug. But my question has to do with ...
0
votes
2answers
162 views

Embedding extremely basic scripts in application

I need to program a C++ application which will basically work as a script interpreter, but with extremely basic and limited scripts. The scripts will have a format like this: processedA = ...
0
votes
1answer
204 views

Why are language features more popular than compiler design? [closed]

If we had a universal interpreter for all available features of programming languages we could use a specializer to generate compilers for all languages. We could simply use any language as source (or ...
-1
votes
2answers
132 views

Should I learn a programming language that compiles to another? [closed]

For about a year now, I've been doing full stack web development. I am doing about 66% backend stuff (in Python), but from a time to time, I need to write HTML, CSS and JavaScript. I really want to ...
1
vote
1answer
66 views

why are the evaluation strategies call-by-value etc. only discussed in the context of function calling?

I am referring to various discussions on the differences and nuances in the semantics of pass-by-value, pass-by-reference, e.g. in SO or in the Wikipedia article on the subject. My question is why do ...
2
votes
2answers
139 views

Should naming conventions be consistent or not across multiple programming languages in one project? [duplicate]

I saw this question on SO: here; the question is kind of old and not many viewed, so I want to ask it again. I currently work on a project using C++, C# and Actionscript-3, the conventions of C++ and ...
2
votes
3answers
382 views

Say I wanted to create a cross platform program that does not require a runtime/VM, am I stuck with C/C++? [closed]

Let's say that I'm a theoretical programmer hunting for a cross platform programming language, what are my options. This language must satisfy this list of requirements: It must not require the user ...
5
votes
4answers
921 views

Is a programming language a set of programs or a set of instructions?

From Structured Computer Organization by Tanenbum A program is a sequence of instructions describing how to perform a certain task. When trying to see a programming language as a formal ...
5
votes
3answers
251 views

Is prototypal inheritance inherently slower?

I see Javascript 6 will add traditional class based inheritance, and one argument I hear is that classes are inherently much faster than prototypes because they can be optimized away by the compiler ...
0
votes
5answers
247 views

Does it matter how I format the name of a function? [closed]

Yes, I know, silly question. But this question has been bugging me for a while, and now I just want to know if it really matters. Basically, I just want to know if it really matters if I format a ...
15
votes
4answers
916 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, ...
6
votes
2answers
314 views

What is the difference between Optionals and Nullable type

Swift has Optionals. C# has Nullable types. As far as I can tell both serve same purpose, besides value of some type they store information whether variable has value or is undefined ...
3
votes
2answers
215 views

Software development - The industry & general trends / Bad practices [duplicate]

I am a Web Developer and part of a small team working on an abundance of projects. This is my first "actual" real company after graduating with a degree in computer Science and I have about 2 years ...
20
votes
4answers
1k views

Why would many duck-typed dynamic programming languages use a class-based approach instead of prototype-based OOP?

Since quite many dynamic programming languages have the feature of duck typing, and they can also open up and modify class or instance methods at anytime (like Ruby and Python), then… Question 1) ...
0
votes
1answer
102 views

Statistics about the usage of programming paradigms [closed]

I hear very often that the object-oriented programming paradigm is the most widespread. But are there any scientific statistics about how often other programming paradigms like procedural programming ...