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

-4
votes
0answers
26 views

Objects and Classes in Python [on hold]

Can anyone: 1. Define what an object is in programming and python. 2. What is class in programming 3. Give an example of an object in python 4. Give an example of class in python I can't seem to ...
2
votes
3answers
181 views

Why do programming language authors choose not to implement UFloat?

I realized I haven't seen this type in Objective C or Swift. But we have UInt. Is there some more Computer Science specific reason we do not have an Unsigned Float? Afaik it's not in c# too.
0
votes
1answer
117 views

What algorithm or program does Java use for arithmetic?

I was looking at bitwise ways to multiply and add numbers without using * or + operators. But I want to know that it might be possible that java may already be using a better approach underneath. I ...
2
votes
2answers
80 views

Different Number Base Systems

I am doing a summer assignment for AP Computer Science. For this I am learning about different number base systems and how to convert them. These topics led to me wondering about why programmers use ...
0
votes
3answers
97 views

Compiling methods in interpreted programming language as standalone c++ app

I'm writing an interpreted implementation of a new programming language (just for fun). In this implementation language is first being compiled to an intermediate language, which is then interpreted ...
7
votes
6answers
621 views

How is static typing really helpful in bigger projects?

While curiosing on the main page of a scripting programming language's site, I encountered this passage: When a system gets too big to keep in your head, you can add static types. This made me ...
1
vote
1answer
62 views

What is the connection between type inference and advanced type systems?

I don't understand the connection between type inference and advanced type systems. I don't see why Haskell or Standard ML or OCaml could not have existed without type inference. My only guess is that ...
1
vote
4answers
373 views

Why does C++ have auto, rather than simply doing the right thing when there are no explicit type declarations?

When auto was considered for addition to the C++ standard, was there any discussion of setting implicit types where there are no explicit declarations? And if so, was the discussion recorded anywhere?...
0
votes
4answers
333 views

Machine learning without programming?

I am old to programming and very beginner to Machine Learning and what make me surprise is the defination as i typed in google i found this. Machine learning is a type of artificial intelligence (...
0
votes
1answer
75 views

Understanding streams

I have started learning streaming APIs and I found one of the good documentations here. There was a comparison given by author to demonstrate the effectiveness of the streams. var http = require('...
2
votes
0answers
56 views

Adding behaviour to a part of a third party class

I am working with an effectively third-party library. This library has a base class that's used as the interface (C++ style), ComponentBase. ComponentBase has a number of methods and setters that are ...
-2
votes
1answer
88 views

What are the most reductionist/minimalist programming languages [closed]

By a reductionist or minimalist programming language I mean a language that tries to be as simple as possible, as long as it is still Turing complete. I would like a programming language so ...
3
votes
3answers
185 views

How Does An Interpreter Work?

I've been searching for tons of websites for how an interpreter works, but I found none of these explain how Interpreter works internally. But I found in many places how compiler works with all the ...
16
votes
6answers
4k views

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
52
votes
8answers
8k views

Are events only used for GUI programming?

Are events only used for GUI programming? How do you handle in normal backend programming when something happens to this other thing?
-2
votes
1answer
150 views

Is it better to learn a new language or a high level application of a known language [closed]

Recently I got chatting with my C# .NET professor and mentioned that over my free time I was learning Rust and it's been very interesting. To this the prof suggested me to not waste my ...
0
votes
0answers
32 views

Debugger directions

I am running an old DOS executable file that runs a set of instructions to test an electronic component via com1 (RS-232) on a pc. The 16bit software has 8 main routines and some subroutines within to ...
3
votes
2answers
236 views

What makes a scientific programming language, scientific?

Why are some programming languages such as Python or Julia considered to be "scientific" programming languages? I guess my real question what is the criteria that makes a programming language ...
0
votes
4answers
508 views

Why use a higher level language? [closed]

A question that gets asked a lot is "Why use low level languages if you can code in high level languages more easily (and often tersely)?". I think the answers are fairly straight forward here, being ...
0
votes
1answer
40 views

Is it possible to use array values to define variable?

What i mean is something like: I have 2 array var and type, you can input the name of the variable on the var array and type of variable on the type array(type depend on language used), then i want to ...
81
votes
8answers
12k views

How to modify the output of a program for which you don't have the source code

In our company we have a small program (.exe 500Kb size) that does mathematical calculation and in the end it spits out the result on a Excel spreadsheet that we use to continue our workflow. I want ...
14
votes
3answers
493 views

Does there exist a programming language specifically designed for dependency injection?

Many general programming languages are flexible enough to allow you to support dependency injection. Even without library or framework support. But even if a language is Turing complete enough to ...
1
vote
3answers
197 views

Which programming languages support operators as first class citizens? [closed]

Which programming languages support operators as first class citizens? eg: Return an operator (+, -, =, ==, etc.) from a function, or store within a variable.
5
votes
6answers
668 views

How much do function calls impact performance?

Extracting functionality into methods or functions is a must for code modularity, readability and interoperability, especially in OOP. But this means more functions calls will be made. How does ...
6
votes
3answers
117 views

What is the origin of counting from zero in programming languages?

This is a question which I have wondered (and been asked) about for a long time. In (most? all?) programming languages, an index begins at zero for an array, string, etc. I recognize it became ...
8
votes
3answers
1k views

Why isn't C's most basic printing function named `print` instead of `printf`? [duplicate]

AFAIK, C does not have a print function. The most basic we can get is printf. So, is there a reason why this function is not simply named print, instead of printf? Note that this question is about ...
2
votes
1answer
109 views

Are there other style sheet languages than CSS?

So this came up in a discussion over lunch about how weird the HTML, CSS and JS triangle of web technology is. HTML is a markup language, one of many. Javascript is a programming language, one of many....
-3
votes
2answers
211 views

Can a media decoder/player be implemented entirely in C#? [closed]

One of these days, when talking to a friend about different programming languages and their uses, I mentioned that video players (and media coding implementations) are always written in lower-level ...
4
votes
2answers
135 views

Can a generic piece of C code be converted an FSM?

I understand that any language worth its salt can encode a Finite state machine. My question is the opposite, is it possible to convert an arbitrary piece of code ( say in C ) to a functionally ...
3
votes
1answer
266 views

Is using a function inside a for loop bad practice?

I recently read somewhere that calling a function within a loop is considered bad practice. Is this true? So for example, if I had the following: function foo(value){ console.log(value); } var ...
3
votes
1answer
68 views

Self-compilation in Forth

What is Self-compilation (a.k.a. Meta-compilation) in Forth? How it works and why is it useful? Does it have any practical usage and is it still used in modern systems?
18
votes
5answers
1k views

Can a programming language by design enforce “clean code”? [closed]

So I'm coding my first projects in C++ and it seems that it takes more effort to make the code "clean", rather than merely work. I.e. it seems as if C++ "allows" to write ugly, but working code. ...
1
vote
2answers
74 views

Language interaction

How does a program composed of several languages work? How do the languages work together or interact with each other? How do they understand stand each other? How do you know when to use any given ...
0
votes
1answer
54 views

Retrieve variable from Console.ReadLine()

I am making a tic-tac-toe game in C#. I have a string variable for each square. I want to make it so the user inputs the square name i.e. (topMiddle). Then I declare the input playerInput. I want to ...
9
votes
4answers
316 views

Composable concurrency in Java or any other programming language

While I was reading a research paper on concurrency named Software and the Concurrency Revolution (html version). I came across following lines: Unfortunately, although locks work, they pose ...
47
votes
4answers
9k views

Why do so few languages with a variable-type 'operator' exist?

I mean it in this way: <?php $number1 = 5; // (Type 'Int') $operator1 = +; // (Type non-existent 'Operator') $number2 = 5; // (Type 'Int') $operator2 = *; // (Type non-...
3
votes
8answers
736 views

Why can't we just use variables instead of constants?

I can't see the point of constants. For example I can use the famous example of PI: PI = float(3.14) Here I get the job done without a constant. Who cares if the value never changes during the ...
4
votes
1answer
148 views

Is there a programming language which requires argument qualifiers (reference/value) to be specified at the call point?

For quite a long time now, I have been using a calling convention from C++ google style guide, which boils down to the following: "[for a function] arguments are values or const references while ...
42
votes
13answers
8k views

Why do you have to specify the data type when declaring variables?

In most coding languages (if not all) you need to declare variables. For example in C# if its a number field then int PhoneNumber If I'm using normal English language I do not need to declare ...
1
vote
1answer
69 views

Had operator precedence rules changed through the history of a computer language?

I would think it would be a massive breaking change if something like this were to happen on a widely deployed language like C/C++, but maybe it had happened in the past. Bonus related question: How ...
5
votes
3answers
447 views

Why should a language prefer indentation over explicit markers for blocks?

I am learning Haskell, and I was looking for an auto indentation tool. I didn't look much, and learned that in Haskell (as in Python), indentation signifies a block. As a result, I'm guessing that it'...
7
votes
3answers
263 views

What paradigm to use when determining shell script vs a “proper” programming language?

For a while now, I have been automating tasks by writing shell scripts in bash. These have gradually become more and more complicated, and I am now finding that bash scripts are a little too simple ...
-1
votes
1answer
87 views

What is an effect system? [closed]

I read this Wikipedia article, but I found it quite abstract. How can an effect system help me as a programmer?
3
votes
3answers
253 views

How do I calculate server requirement for a web application

I am developing a backend where in I will be exposing APIs for my mobile application. Users can register,add products,share the links of products through email/sms/anywhere and others can click on it ...
0
votes
1answer
66 views

Concurrent languages and non-concurrent dependencies [closed]

We had a bug caused by ruby workers (4 processes, 1 thread each) doing batching records using a legacy mongodb as the store. The race condition was around whether the batch was full or not; with one ...
17
votes
3answers
425 views

Are there alternatives to types for static analysis?

Static typing in a programming language can be helpful for enforcing certain guarantees at compile time- but are types the only tool for this job? Are there other ways of specifying invariants? For ...
1
vote
2answers
159 views

“Fuzzy” parsing in different languages

I have a bunch of plain-text like this: 1 MILE, PACE, PURSE $1,100. FILLIES & MARES N/W $541 L5 STARTS AE N/A $301 L5 & N/A $60 PS IN 2015-16 DRAW INSIDE ...
30
votes
13answers
3k views

Help in understanding computer science, programming and abstraction [duplicate]

Until now, I always believed that you should learn programming languages that make you do low-level stuff (e.g. C) to understand what's really happening under the hood and how the computer really ...
7
votes
4answers
492 views

in dynamic language like javascript how do you know what the argument is?

In Java or Scala if I have an argument configuration: Conf, I can look for Conf class/trait/case class and see its construct so I know which arguments to pass. Recently I started dealing with ...
-1
votes
2answers
234 views

Does exist a reflexive compiled language? [closed]

I just wonder if exists a compiled language that can modify it's own machine code. I know that in most common operative systems the executable code is protected during execution time, but maybe if ...