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
1answer
74 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 ...
-3
votes
0answers
79 views

What language(s) used to develop F-35 software? [on hold]

I'm curious about what kind of technology used in the development of the F-35 fighter jet's software. I just read some news about how bug-ridden the system is, and would like to know what were used to ...
-3
votes
0answers
108 views

Cons and Pros of ternary operator instead of if/else [closed]

I have some set of code in which same code is written by using two logics. which are as follows. 1. if (cart.getFacebookShare()) { return BigDecimal.TEN; }else{ return BigDecimal.ZERO; } ...
26
votes
13answers
2k 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 ...
6
votes
4answers
430 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
196 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 ...
8
votes
3answers
338 views

How useful is C's “true” sizing of variables?

One thing that always intuitively struck me as a positive feature of C (well, actually of its implementations like gcc, clang, ...) is the fact that it does not store any hidden information next to ...
2
votes
2answers
79 views

Why does Scala name monadic composition as “for comprehension”?

Not sure if it's an appropriate question, but here it goes. I know Haskell's do notation pretty well. And I realized that Scala's "for comprehension" really is just mostly the same as do notation in ...
17
votes
3answers
849 views

What is benefit that a compiler is implemented in the same language it compiles? [duplicate]

I've seen it's very common for a compiler to be made in the language it's compiling. What is the benefit of this? Seems like it makes the process for outsiders (and the developers for a while) more ...
-2
votes
1answer
97 views

How do I create my own Objective-C to Swift converter? [closed]

I'm really interested in writing my own converter. I know C++/Python/Objective-C/Swift and a little Haskell. There are website like objectivec2swift and iswift.org, which can convert OC to Swift ...
-3
votes
1answer
66 views

What comes first: choice of language or choice of libraries? [closed]

You're starting a new project. You and your team are fluent enough in a number of programming languages. You begin the design phase. What should be discussed first: the language of choice, or the ...
2
votes
2answers
163 views

Has any language ever supported a conditional assignment target? [closed]

I've never seen a programming language with conditional assignment targets, eg.: // If (x == y), then var1 will be set to 1, else var2 will be set to 1 ((x == y) ? var1 : var2) = 1 The target of ...
0
votes
3answers
163 views

What really is the “runtime environment”?

This is a very basic question but is something I've never completely understood and recently, when studying .NET Core and ASP.NET 5 I felt the need of a more complete understanding of the topic. ...
2
votes
2answers
136 views

Private variables and the old FORTRAN common blocks [closed]

This is a question that perplexes me about object oriented programming. In some OOP languages (e.g. C++) a member function can access private variables of the class without restriction. That means ...
-1
votes
1answer
156 views

Is C programming language low level or high level? [duplicate]

What do you think, is C programming language low or high level? There are some information, in one is said that C is low level, and another C is high level? When I read book of Dennis Ritchie and ...
-3
votes
1answer
182 views

Designing a programming language, seeking simple and logical parameter behavior [closed]

I am designing a programming language, and would want to make it as simple as possible, conforming to layman's logic. I've been using many programming languages, although the last few years I've been ...
2
votes
3answers
322 views

Why do most language's definition of substring allow substring(“abc”, 3) => “”

I've seen most languages have it be the case for their substring method that using the length of a given string in the method as the start index will give you an empty string. It is most definitely ...
29
votes
10answers
7k views

Why is Math.Sqrt() a static function?

In a discussion about static and instance methods, I always think, that Sqrt() should be a instance method of number types instead of a static method. Why is that? It obviously works on a value. // ...
17
votes
1answer
2k views

Why not make a language with mixin-only inheritance? [duplicate]

It seems that in all class-based or prototypal OOP languages, mixins are either an afterthought or a secondary feature. However, to me it looks like traditional inheritance is just a specific case of ...
3
votes
2answers
173 views

What was the first language to support convenient user-land recursion?

What was the first programming language to support convenient user-land recursion? I know that early languages did not support it, but can find no specifics on when it was introduced.
0
votes
2answers
314 views

Why doesn't Java implement a better way of handling getters and setters? [closed]

Getters and setters are everywhere in Java, but they are managed in a horribly outdated way. Simply put: Why doesn't a newer version of Java enable a simpler syntax for managing it? Even if this ...
0
votes
1answer
38 views

Is it a reasonable task to automatically convert ANTLR grammars to my own format?

I was working on my own parser generator tool in Clojure and then I realised I want to test it with some real programming languages. I can find a lot of existing language grammars only in antlr v4 ...
-4
votes
4answers
288 views

Why aren't named switch statements a language feature? [closed]

I could imagine the below code being somewhat useful. Is there a reason this pattern hasn't made it into programming languages? To be clear the string was just what I chose as an example you could ...
2
votes
3answers
407 views

Is `isNaN`' a bad design or a has-to-be design with tradeoffs?

My first programming language is python. And recently I'm learning C and javascript. In javascript, there is a design which confused me a lot, default the function isNaN. Put aside its weird ...
0
votes
1answer
195 views

Do any languages have syntax for promises? [closed]

I'm really glad that EcmaScript 6 has promises built into the language, but the syntax will still be quite wordy: new Promise(f).then(r => { ... }).then(r2 => ... }).catch(... I'm just ...
5
votes
2answers
397 views

How are scripting languages compiled?

I know the term "scripting languages" is just a subset of programming languages, but I want to refer to programming languages such as Python and Ruby among others. First of all, why don't we need a ...
4
votes
2answers
361 views

Why do we need a seed in Random Number Generators?

I want to know how Random number generator(RNG) works in any PL(Programming language). I know the random methods has short periods. i.e they start repeating the values after specific number of time. ...
3
votes
2answers
69 views

Implementing incremental builds [closed]

I'm working on a toy language. Until now, multiple files have been compiled by merging the ASTs of each file and then running the semantic analysis and code generation phase on the merged AST. Now ...
0
votes
2answers
120 views

Can there be value types in dynamic languages? [closed]

A value type is one whose instances are themselves saved in variables. A reference type is a type whose instances are saved somewhere and variables only hold the addresses of the instances. Some ...
22
votes
5answers
3k views

Why do build tools use a scripting language different than underlying programming language?

I've recently been using some build tools for a Nodejs project at work when I realized that most languages' main build tool/system use a different language than the underlying programming language ...
2
votes
2answers
171 views

Why not expose activation records as data types? [closed]

Scoped languages tend to store the local variables of a given scope or function together in a data structure known as an activation record. Stack frames are examples of instances of activation ...
4
votes
4answers
212 views

What does weak static typing/strong dynamic typing mean? [closed]

For most of my career, I've been working with strong static typed languaged such as Java. For this reason, probably I've mixed up these two typing dimension (strongness and staticness). I came upon ...
9
votes
2answers
1k views

Functional programming, compared to the process of a computer [duplicate]

In functional programming, it is considered bad practice (at least from my observations) to use state changes. Since computers operate in an imperative-language-like matter (performing one operation ...
-2
votes
1answer
122 views

When to use typedef in C programs? [closed]

I'm learning C programming language... I discovered recently the typedefkeyword... When is the right time to use it in a C program? And this is an example: typedef struct Books { char ...
0
votes
2answers
335 views

How are complex programs made? [duplicate]

I know a few languages, and can program in them. How do multiple languages blend together in a single program? For ex. https://github.com/facebook/watchman. This uses C, PHP, Python, Javascript, etc. ...
1
vote
4answers
137 views

When is an object passed to a function?

Trying to clearly state the semantics of a function call. In calling a function, are the arguments passed to the function the ones the calling code initially gives or the ones the function ...
20
votes
1answer
1k views

Why do arrays in .Net have Length but other collection types have Count? [closed]

In C# for example, arrays have Length property. But other collection types like lists, etc. have Count property. Is there a reason why these two are different? If so I would like to know.
16
votes
1answer
510 views

In what programming language did the use of the percent sign (%) to mean modulo/remainder originate?

In what programming language did the use of the percent sign (%) to mean modulo/remainder originate? This previous post1 explains that the symbol % was likely chosen because it includes a slash, ...
0
votes
0answers
75 views

Why are scriptlets considered bad practice in JSPs when much more popular languages such as PHP seem not have any problem with them? [duplicate]

Why is doing <% if(blahblah) { //do something } %> in a JSP considered to be bad practice when noone who writes PHP seems to have any problem with doing essentially the ...
4
votes
2answers
183 views

Are string characters assigned a numerical value in context of how they are assigned in a programming language?

For context I am fairly new to programming after returning back to it after programming a number of years ago... I was reading Bjarne's intro programming with C++ and was wondering if alphabetical ...
2
votes
2answers
136 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 ...
0
votes
2answers
167 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
4answers
122 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
43 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
vote
1answer
10k views

What is ¬ called and what is it for? [closed]

Googling this question has proved somewhat useless, so the ¬ symbol: What is it for? What is is called? Is it used in any programming languages?
-1
votes
2answers
166 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
92 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
77 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
99 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
339 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, ...