Questions tagged [programming-languages]

A programming language is an artificial language designed to express computations that can be performed by a machine. **Please note:** As is the case elsewhere on Stack Overflow, resource and tutorial recommendation requests, requests for lists of things ("which languages have this feature..."), and excessively opinion-based ("what's the best...") questions are off topic.

In the 1950s E. Dykstra stated that:

We can call something a programming language if it does three things: execute sequential statements, make decisions and allow looping or iteration.

A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer.

This tag is particularly suitable for questions about programming languages and programming language design in general.

A programming language is a notation for writing programs, which are specifications of a computation or algorithm.

A popular weblog dedicated to programming languages design is Lambda the Ultimate.

Programming language description wikipedia

For a discussion on the use of the tag see here.

4117 questions
3
votes
4 answers

In C#, What is the purpose of enclosing the method within this class?

I am new to C#. What is the purpose of placing the main() method within a "class". No object is going to be created for this "so-called" class. I don't know why they are looking at the entire program as classes and methods. Also why is the main()…
Ben Reed
  • 824
  • 1
  • 8
  • 26
3
votes
10 answers

Are there any languages that talk straight to the hardware and that aren't assembly?

Just wondering how the world of assembly works, and I was reading about the assembly language on wiki and this quote struck me: It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular…
Ólafur Waage
  • 68,817
  • 22
  • 142
  • 198
3
votes
3 answers

Is there any XML like programming lanuage?

Is there any XML like programming lanuage? For example this code in C: int add(int a, int b) { int result; result = a+b; return result; } Write like this:
Amir Saniyan
  • 13,014
  • 20
  • 92
  • 137
3
votes
7 answers

what is the Best definition of the term "Type" specially in c# language?

This is probably a very simple question but I have a confusion about the Type definition. When you want to provide a definition of the term Type such as Int, String or... Immediately the word Template comes to mind, but its so close to the "Class"…
siamak
  • 669
  • 1
  • 10
  • 28
3
votes
2 answers

Best way to load and unload JS file via JQuery

I've been frustated trying to find the best way to load and unload some JS file via jQuery, this was last what I can do: $("#button").live("click", function(){ var pl = $(this).attr('rel'); $.getScript('' + siteAddress + 'min/?js=fjs'+ pl…
dedudit
  • 51
  • 1
  • 1
  • 3
3
votes
3 answers

Writing a programming language

Disclaimer: Yes I know this will take 3 years, at least. I am looking forward to writing a new interpreted programming language. I have a quite solid idea of what I want in terms of dynamicness, syntax, object model, etc, etc. Now that I have the…
orlp
  • 112,504
  • 36
  • 218
  • 315
3
votes
4 answers

C language: recursive #include

I came across such piece of code: a.h: #include "b.h" /* structure definitions, macros etc. */ b.h: #include "a.h" /* structure definitions, macros etc. */ Is this legal from the C standard point of view? I would think such approach isn't…
Mark
  • 6,052
  • 8
  • 61
  • 129
3
votes
0 answers

If a programming language compiles to Java 8 bytecode, can it also run on Android?

I am creating a JVM language called Crypt which compiles to Java 8 bytecode. My question is, if this language can compile to Java 8 bytecode, and Java 8 bytecode runs on Android, can my language code also run on Android*? *I've searched the internet…
AurumByte
  • 43
  • 1
  • 7
3
votes
9 answers

Learning java, why are my privates private?

Im learning java, coming from python there are quite a few things I don't fully understand that exist in java and the first of these has to be public and private declarations. I mean from a language that has no real visible public private…
Jakob Bowyer
  • 33,878
  • 8
  • 76
  • 91
3
votes
1 answer

PHP - Get rid of notation

I have a very large number here but I cannot get rid of the notation. I want it to display only numbers instead of "4.8357032784585E+24 - 77" I tried (int)$variable but it didn't help. Suggestions?
Howdy_McGee
  • 10,422
  • 29
  • 111
  • 186
3
votes
0 answers

Why does universe level restriction behave differently between inductive family and parameterized inductive type without axiom K in agda

An observation when defining List in agda with --without-K enabled: The following parameterized inductive definition is accepted: data List (A : Set) : Set where [] : List A _::_ : A → List A → List A but not the equivalent inductive family…
3
votes
1 answer

How does an interpreter use a DSL?

I'm using an interpreter for my domain specific language rather than a compiler (despite the performance). I'm struggling to understand some of the concepts though: Suppose I have a DSL (in XML style) for a game so that developers can make building…
3
votes
6 answers

What's the difference between File stream in C and iostream in C++?

What's the difference between File (File* pointer)stream in C and iostream in C++? Why are they both called stream, do they have something in common?
MainID
  • 29,070
  • 19
  • 57
  • 70
3
votes
6 answers

Is there any multiplatform language?

I need something that can be run both on JVM and .NET. What is the best option to achieve that?
3
votes
3 answers

Matlab Matrixaddress

During my course I came across that expression: A(:,end:-1:1) I have trouble to understand and read the morphemic structure of the 2nd Operand "end;-1;1" Lets take the example: A=[1 2 3; 4 5 6; 7 8 9] I am aware of: A(:).. Outputs [1 2 3; 4 5…
1 2 3
99
100