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

-3
votes
0answers
56 views

Is it more important to learn one programming language as proffessional then to learn many programming lahguages? [on hold]

I often heard that it is important to learn many programming languages. And I often heard that programming language is just a tool. But after that I saw a lot of programmers in different chats, videos ...
-6
votes
0answers
28 views

Need advise on javascript and php [on hold]

I know this is off topic question and you may voted down. But i really need your advise on JavaScript JQuery and PHP. I always see this type of ads Need full stack developer on famous job sites. I'm ...
-3
votes
1answer
71 views

Voice control of wheelchair [on hold]

I'm working on a project to control a wheelchair by voice. But I'm an amateur programmer and have no knowledge how to write a code for voice control. So I wanted to know if it is possible for me to ...
-6
votes
0answers
36 views

What do we mean by task driven programming language

I was looking at C# language's wiki page and it is multi-paradigm language, one of them is Task Driven paradigm. I did not get any information from wiki for this. So my question is, what is task ...
-1
votes
0answers
14 views

Read PCAP: memory error with Python DPKT [migrated]

I am trying to read PCAP file in python 2.7.10. The code is:---> import dpkt f = open('testbed-11jun.pcap') pcap = dpkt.pcap.Reader(f) for ts, buf in pcap: print ts, len(buf) But I got this ...
-2
votes
0answers
34 views

Short code command to send a bill in .pdf or even .txt file format [on hold]

I'm building a website similar to opentable.com but on a much smaller scale for a much smaller market. So I don't have the budget to make a complete solution like opentable has, that is, I don't have ...
0
votes
1answer
37 views

Concurrent languages and non-concurrent dependencies

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 ...
12
votes
3answers
175 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 ...
-6
votes
0answers
45 views

Changing a platform programming language [on hold]

Simply - If we have a programming language and its compiler, how to move it from platform like windows to mobile phone? For ex. Python to Windows Phone?
0
votes
1answer
75 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 ...
25
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
431 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
197 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 ...
9
votes
3answers
346 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 ...
1
vote
2answers
82 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
851 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
99 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
67 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
164 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
166 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
137 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
159 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
184 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
175 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
39 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
398 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 ...
3
votes
2answers
417 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
213 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
123 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
520 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
185 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 ...