Skip to main content

All Questions

13 votes
8 answers
6k views

How do compilers work in a language that doesn't allow recursion?

I'm recently learning the programming language, and I wonder how compilers work when the language itself does not allow recursion, like how the compiler or the runtime checkers makes sure that there ...
csxyyyyy's user avatar
  • 151
-2 votes
4 answers
247 views

Block structured iteration and recursion

Programming languages traditionally have blocks that specifically cater to controlling iteration. There is the simple while-loop: while (i < 3) {...}; Then there is the more complicated for-loop: ...
Steve's user avatar
  • 12.2k
3 votes
1 answer
188 views

Choosing the design of a scientific DSL: purely or impurely functional?

My aim is to create a language specific to the scientific field (which would be used mainly in the field of machine learning and physics) which would be based on the functional paradigm, a paradigm ...
Foxy's user avatar
  • 621
3 votes
3 answers
236 views

Precisely define "what to solve" and "how to solve" corollary in functional and imperative programming respectively

I am not sure if I ever clearly understood standard corollary "what to solve" and "how to solve" used to point out difference between functional (declarative) and imperative programming paradigm ...
rahulaga-msft's user avatar
-1 votes
1 answer
155 views

Reactive programming language [closed]

I had been using react-js and really like its concept so I want to know if there is a programming language/framework that sort of works like it. For instance, I want to define: var A = something var ...
letFunny's user avatar
5 votes
3 answers
2k views

In functional programming, what it means "Order of evaluation does not matter" when function is pure?

In context of pure functions in FP, apart from several benefits mentioned like easy to reason about, testability it also says "order of evaluation does not matter" since output remains same for given ...
rahulaga-msft's user avatar
54 votes
11 answers
12k views

"Easy to reason about" - what does that mean? [closed]

I have heard a lot of times when other developers use that phrase to "advertise" some patterns or developing best practices. Most of the time this phrase is used when you are talking about benefits of ...
Fabio's user avatar
  • 3,166
2 votes
2 answers
416 views

Strategy for implementing Multiple Dispatch

This is a question regarding how Multiple Dispatch works. Suppose that we have a type hierarchy like this: Drawable -> Shape -> Polygon -> Rectangle And there are three functions (This is ...
Mahdi's user avatar
  • 189
1 vote
1 answer
180 views

What is the connection between type inference and advanced type systems?

I don't understand the connection between type inference and advanced type systems. I don't see why Haskell or Standard ML or OCaml could not have existed without type inference. My only guess is that ...
eatonphil's user avatar
  • 571
17 votes
6 answers
4k views

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
user avatar
7 votes
2 answers
2k 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 ...
xji's user avatar
  • 791
-2 votes
1 answer
753 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 ...
Tiper's user avatar
  • 15
11 votes
2 answers
2k 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 ...
sneelhorses's user avatar
4 votes
2 answers
183 views

Functional Programming - Functions defining specific evaluation of functions passed to it for optimization

Firstmost, I am just getting started with functional programming so I would appreciate corrections in any terminology I may have used incorrectly. Story time, While doing a Project Euler Problem 1 in ...
Fabián Heredia Montiel's user avatar
3 votes
1 answer
1k views

What aspects of Haskell led to its rise in popularity among experts?

20 years ago, the Functional Programming world was all about Lisp and Scheme. When I went to college in 2001, my Fall Semester Freshman CS 101 course was taught in OCaml. However, these days the ...
durron597's user avatar
  • 7,610

15 30 50 per page