Questions tagged [programming-languages]

Artificial languages for instructing computers to do steps of computation in order to complete tasks. They allow programmers to communicate with computers.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
375 views

Transpiling <XY> language into a custom one

Our company has a legacy assembly-like language with some terrible design choices. I'm pretty sure the language is not going to change, since way too many legacy things might change their behavior ...
3
votes
0answers
225 views

Understanding Typescript's views on inheritance

I have been struggling to understand the reasons why typescript developers choose the way they implemented inheritance. What I would expect from any language supporting inheritance is these order of ...
1
vote
0answers
130 views

What obstacles should I expect in building universal Abstract Syntax Tree's manipulation tool?

I am trying to build code generation and transformation tool and hence I need software for Abstract Syntax Tree manipulation for at least three languages (Coq, Haskell, Java). So far I have managed to ...
1
vote
0answers
79 views

Pre-Compilation Processor:

What I want to do: Parse source code, search for a beginning and closing tag of my own definition (one that does not conflict with any defined patterns in the programming language), and then replace ...
0
votes
0answers
141 views

Decided to code the new project in TypeScript, should everything be coded in this language?

We have decided to code the new project in TypeScript at the company. Does this mean that everything should be coded in this language? Discussion My first thought was Yes. On the other hand ...
0
votes
0answers
47 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, ...
0
votes
0answers
85 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.
0
votes
1answer
655 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 ...
-1
votes
0answers
40 views

What should the parser do with the output of the lexer?

Currently I am working on my own compiled language. I have finished the lexer and its output is a token list, the parser should go through this list and build the trees. Example file for the language:...
-1
votes
1answer
147 views

Why do we use 'assert not' in this example?

My code takes 2 dates and finds the age of those dates in days. In my daysBetweenDates method the instructor uses an assert statement: assert not dateIsBefore(year2, month2, day2, year1, month1, day1)...
-1
votes
1answer
229 views

Interactive help in a statically-typed language with overloading

One of the nice features of IPython is that I can inspect a function. In [1]: def inc(x): ...: """Increments a number""" ...: return x+1 ...: In [2]: inc? Type: function ...
-2
votes
1answer
124 views

Multiple variable declaration, multiple variable assignment, context-sensitive 'in' statement

Lately I've been playing with writing my own programming language, following the excellent Crafting Interpreters book but I've hit something of a snag. I'd like to extend the parser to accept ...
-3
votes
1answer
85 views

Receiver parameters in Go

I have no idea where to post this question since it isn't about the Go language specification itself but rather the justification. In the Go language, functions can have receiver parameters to ...
-3
votes
1answer
56 views

What are the existing solutions for creating object graphs in an interpreter?

Please let me know if this isn't the right SE site (or otherwise) for this kind of question, it's the best match I could find. I'm working on a humble interpreter written in C for a simple language I'...