Artificial languages for instructing computers to do steps of computation in order to complete tasks. They allow programmers to communicate with computers.
4
votes
2answers
232 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.
...
4
votes
7answers
566 views
How to choose a language, when taking in account the community it includes? [on hold]
I was reading the following article: Great Hackers
The following part grabbed my attention:
"When you choose a language, you're also choosing a community. The programmers you'll be able to hire ...
-5
votes
0answers
39 views
Fastest way to build a webpage embedding a Java compiler [on hold]
I'd like to build a simple website with runnable java coding assignments. They will be just simple java assignments on practicing basics on loops and logic.
So the only library that will be used is: ...
5
votes
12answers
3k views
One language to rule them all? (Them being platforms.) [closed]
I have been discussing a project with a client and they want to use a single language to deploy to as many platforms as possible.
(I am not sure that it's such a good idea, because each platform ...
-4
votes
0answers
27 views
Point me to right direction / Raspberry pi2 + twe-lite [on hold]
Good day to all. I will be more specific this time.
Currently in Japan as an exchange student and got assigned programming, which is not even close to my study subject, but I just have to do it.
I ...
-2
votes
0answers
73 views
Alternatives to Scala [on hold]
I'd really like to program in a language that offers both object oriented and functional coding features.
I guess that Scala is the language that offers this the most. Anyway I'd like to avoid the ...
-8
votes
0answers
67 views
How the traffic lights are made with c++? [on hold]
How they works and what is their source code?
And is it true that traffic lights can be hacked with a single laptop only?
-2
votes
0answers
31 views
Coming from Ruby to C++: What should I look out for? [closed]
To make a long story short, I have a college class next semester that deals with c++. I've known this since late July, so to get more used to programming languages before hand, I've decided to ...
3
votes
2answers
66 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 ...
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 ...
3
votes
7answers
612 views
Why can we not insert into files without the additional writes? (I neither mean append, nor over-write)
This occurs as a programming language independent problem to me.
I have a file with the content
aaabddd
When I want to insert C behind b then my code needs to rewrite ddd to get
aaabCddd
Why ...
0
votes
2answers
105 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 ...
18
votes
10answers
4k views
Why learn more programming languages? [duplicate]
Possible Duplicate:
(Why) Should I learn a new programming language?
I came across a line in this article which is,
Learn one programming language every year
Why do good programmers ...
4
votes
4answers
153 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 ...
21
votes
5answers
18k views
Programming Language vs Markup Language vs Scripting Language
Up until now I don't know the KEY differences between these three. When someone asks me about this, I only tell them that C# is a programming language, HTML and XML are Markup Languages, and ...
2
votes
2answers
128 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 ...
25
votes
6answers
2k views
What specifically does expressive power refer to?
Expressive Power is defined by Wikipedia as:
.. the breadth of ideas that can be represented and communicated in
that language.
Does "ideas" refer to the things (operations, structures, ...
9
votes
2answers
907 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 ...
20
votes
8answers
15k views
Why are people laughing at visual basic? [closed]
When I was at high school I used visual basic 6 and I think it was pretty good. Then I came to the university and began to use c/c++ java python etc.. I didn't find a reason why people laugh at visual ...
4
votes
3answers
2k views
Left and Right most Derivation
So i understand the semantics of derivations as far as Backus Naur Form goes. One thing I cannot find in any text book or the various lecturers' notes that are on-line is this.
When would a right ...
1
vote
1answer
136 views
How do references work in R?
I'm finding R confusing because it has such a different notion of reference than I am used to in languages like C, Java, Javascript... Ruby, Python, C++, well, pretty much any language I have ever ...
-2
votes
1answer
80 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 ...
22
votes
11answers
3k views
Is there a language offering LISP-like macros with a more complex syntax? [closed]
LISP's macros are extremely powerful constructs, and the inability to introspect and modify the program itself beyond the method signature level has always struck me as a limitation. Yet I favour ...
33
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 ...
0
votes
2answers
300 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
128 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 ...
17
votes
4answers
1k 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, ...
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.
33
votes
13answers
40k views
Why is C++ still preferred to build heavy GUI apps over the latest dynamic languages? [closed]
I see that most of the apps that include heavy GUI content are usually developed in C++. Most of the games/browsers are coded in C++.
Can't we just develop better GUI apps with the latest dynamic ...
14
votes
1answer
433 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, ...
-2
votes
1answer
165 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 ...
2
votes
4answers
95 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 ...
56
votes
11answers
18k views
Why is String immutable in Java?
I couldn't understand the reason of it. I always use String class like other developers, but when I modify the value of it, new instance of String created.
What might be the reason of immutability ...
-4
votes
1answer
164 views
Comparing the Java language to non-Java JVM languages [closed]
I was contemplating on the necessity of different non-Java languages coming up on the JVM. Apart from syntactic sugar and built-ins, does any of them actually exploit some corner of the JVM, which has ...
0
votes
0answers
74 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 ...
5
votes
2answers
760 views
A study shows that lines_written/time is language-independent for most programmers. Where can it be found? [closed]
A study shows that lines_written/time is language-independent and application-independent for most programmers. If this were true it would imply that the most terse a language is, the more productive ...
4
votes
2answers
440 views
Why do people confuse C-type strings and STL strings [closed]
The last week I saw at least three questions where people were confused about the differences between char * and std::string or made some related mistakes.
Don't get me wrong, I don't have a problem ...
23
votes
4answers
18k views
Why were default and static methods added to interfaces in Java 8 when we already had abstract classes?
In Java 8, interfaces can contain implemented methods, static methods, and the so-called "default" methods (which the implementing classes do not need to override).
In my (probably naive) view, there ...
3
votes
2answers
521 views
Giving variables default values vs. treating accessing an undefined variable as an error
Having messed around with several scripting languages and being a bit of a linguist, there seems to be a way to divide dynamically typed languages into two groups: languages that give variables a ...
3
votes
2answers
141 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
104 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
158 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 ...
0
votes
0answers
41 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
104 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 ...
8
votes
2answers
1k views
Documenting a programming language: Reference Manual
We are looking at revamping documentation across our product line. Part of that includes reference manuals for a programming language used as part of the system.
When writing a reference manual for a ...
-2
votes
1answer
85 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 ...
66
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 ...
0
votes
0answers
69 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.
71
votes
15answers
26k views
What makes C so popular in the age of OOP? [closed]
I code a lot in both C and C++, but did not expect C to be the second most popular language, slightly behind Java.
TIOBE Programming Community Index
I'm curious as to why, in this age of OOP, C is ...
1
vote
3answers
271 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, ...