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
21 views

What is prerequisite for Algorithm and Data Structure Analysis and Designing [on hold]

I want to learn Programming, So I want to start this learning program with studying of the Introduction to algorithms book. I'm familiar with C, C++ and ASM Language a little bit, but I can't write ...
2
votes
2answers
80 views

Incorporating functions into a Shunting-Yard algorithm implementation

tl;dr What would be a simple way of incorporating functions into a Shunting-Yard algorithm implementation? If only expressions like function(arg1, arg2, arg3) were allowed (where function is some ...
-3
votes
1answer
34 views

What IDE is good for cellular automaton creation? [on hold]

I have been researching a lot about Langton's ant and elementary cellular automatons. And now I would like to program my own ant. The only problem I have is that I want it to look nice and have not ...
-5
votes
0answers
34 views

I am learning c programming using codes represented on web please help [on hold]

I am making a bank type program. I am stuck in if else statement step. Pls help Codes are as follows: #include<stdio.h> #include<conio.h> int main() { char fName; char mName; char ...
-3
votes
0answers
61 views

Developing android app that can communicate each other [closed]

My Objective I want to create two android applications that can communicate each other. Let's call them Application A and Application B for now. Application A will have some buttons which will send ...
0
votes
2answers
140 views

Are private members useful anymore? [duplicate]

Watchpoints and data break points make it possible to watch the changes of a value in memory in many languages. Much of the justification I have seen for getters and setters and private variables ...
2
votes
2answers
40 views

Clean Abstract Syntax Tree

I'm writing a toy compiler for fun. Basically, my problem is that I don't want to clutter the AST with stuff like debug information (symbol tokens, locations of tokens, etc) as well as data that the ...
0
votes
0answers
33 views

Synchronizing webpage and local pdf

I would like to solve the following problem. On my website, I have a list of my publications. I also have my list of publications on a latex file of my cv. The issue is that I update these manually, ...
-1
votes
2answers
67 views

Will statically typed, compiled programming languages be affected by Microservices Architecture? [closed]

Judging based on my experience, as systems grow bigger, statically typed languages like Java or C# tend to be more reliable and easier to manage. But do we need all the advantages of such languages ...
-2
votes
1answer
81 views

Are there languages with Primitive Types whose default values are null? [closed]

For example: in C#, the default value of int is "0"; however you have the option to use int? with a default value of "null". Is there a language where this is non-optional? Specifically, where the ...
0
votes
0answers
66 views

Why are datatypes different in terms of bit size based on complier, and OS used

I was reading a tutorial on C++ as I am new to programming, and I was wondering why the sizeof operator gives different output depending on what you're programming with.
-1
votes
1answer
46 views

Short Circuit Execution [closed]

Modify the car painting example car.color = favoriteColor ||"black"; so that the car is painted with your favorite color if you have one; otherwise it is painted with the the color of your garage: ...
1
vote
3answers
242 views

Is there any programming language(s) which has mathematical number types? [closed]

I may not have worded the title correctly. Is there any programming language(s) which deals with natural mathematical number types rather than the typical data types we see like Int32, Int64, Float, ...
65
votes
13answers
6k views

Do objects in OOP have to represent an entity?

Does an object have to represent an entity? By an entity I mean something like a Product, Motor, a ParkingLot etc, a physical, or a conceptual object, something that is well defined, with some core ...
30
votes
5answers
5k views

Bad practice - switch case to set environment

In the last three years that I have worked as developer, I have seen a lot of examples where people use a switch statement to set the path (both in back-end and front-end) for a URL. Below is an ...
-1
votes
1answer
61 views

execute selection in console in C++ like python or R language [closed]

I am started to learn C++ using as IDLE Clion of jetbrain company. Normally using the IDLE of Python (i.e., Pycharm of Jetbrain) or R project i am able to execute selection in console line-by-line my ...
1
vote
2answers
124 views

Looking for a specific programming paradigm [closed]

I am searching for programming languages with a certain paradigm, or the name of the paradigm which works like follows: You start with writing the source code of a program or something more like a ...
-6
votes
1answer
86 views

How do you compare Languages? [closed]

How do you rate different programming languages and compare them? I've worked with many languages including PHP, JS, Java, C++, C# .... and sometimes I hear people say for example php is old and ...
0
votes
1answer
130 views

Limitations of modern programming languages for low-level network programming [closed]

For say a network packet sniffer, are there any of the more modern high level languages such as C# or Java, that would actually be unsuitable or limiting when it would come to constructing a packet ...
3
votes
6answers
588 views

Should I use a source-to-source or a traditional compiler in order to develop my own Programming Language?

I'm really interested in writing my own general-purpose high-level programming language, but I'm somewhat confused. I know that Python and Ruby were written in C, which makes me wonder that if I want ...
4
votes
2answers
124 views

Functional Programming - Functions defining specific evaluation of functions passed to it for optimization

Firstmost, I am just getting started with functional programming so I would appreciate corrections in any terminology I may have used incorrectly. Story time, While doing a Project Euler Problem 1 in ...
12
votes
9answers
4k views

Why can't there be any implicit conversions?

As I understand it, implicit conversions can cause errors. But that doesn't make sense -- shouldn't normal conversions also cause errors, then? Why not have len(100) work by the language ...
0
votes
0answers
106 views

Interactive help in a statically-typed language with overloading

One of the nice features of IPython is that I can inspect a function. In [1]: def inc(x): ...: """Increments a number""" ...: return x+1 ...: In [2]: inc? Type: function ...
-1
votes
1answer
51 views

SPARC and Assembly [closed]

I'm currently self teaching myself programming and became familiar with Python, Java and C and I'm confused as to what are the differences between Assembly and SPARC Assembly and whether or not I ...
2
votes
3answers
298 views

Does a Completely Full-Featured Intermediate Language Exist?

Often when translating between languages (whether with program translation or compiling) it's a one-way, destructive translation. The functionality of the "port" isn't lost, but some of the intent ...
0
votes
1answer
144 views

Is it bad to implement a language in other two languages? [closed]

Ok, so I have some understanding about parsers and compilers, at least the basics of how it works, and i've written a calculator and a really small toy language that compiles to another high-level ...
1
vote
1answer
131 views

Compile new JVM language down to Java or JVM bytecode? [closed]

I am making a new hobbyish programing language and want to target the JVM. Do I lose any optimization opportunity if I choose to compile my language down to Java instead of the JVM bytecode?
1
vote
1answer
286 views

What aspects of Haskell led to its rise in popularity among experts?

20 years ago, the Functional Programming world was all about Lisp and Scheme. When I went to college in 2001, my Fall Semester Freshman CS 101 course was taught in OCaml. However, these days the ...
2
votes
2answers
217 views

Pre-Processors vs Pure Web [closed]

It seems like within the last few years or so HTML/CSS/JavaScript Preprocessors have exploded in quantity and general use. They're still not as common as pure HTML, CSS, and JS/jQuery, but their ...
49
votes
8answers
6k views

Why does C provide language 'bindings' where C++ falls short?

I recently was wondering when to use C over C++, and vice versa? Fortunately someone already beat me to it and although it took a while, I was able to digest all the answers and comments to that ...
-2
votes
1answer
113 views

Crawler - programming language choice [closed]

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 ...
6
votes
2answers
164 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
133 views

Question about switch-case statement [closed]

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
84 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
69 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
vote
1answer
80 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
503 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
195 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
135 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
293 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
94 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
79 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 ...
0
votes
2answers
241 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
184 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
938 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
93 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 ...
34
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
357 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 ...