Live data from Hacker News

The Bosque Programming Language

microsoft.com

171–172 of 172 posts

Re: The Bosque Programming Language

#171

Earlier quoted context omitted.

"Choosing the equal sign to denote assignment is one notoriously bad example that goes back to Fortran in 1957 and has been copied blindly by armies of language designers since. This bad idea overthrows a century-old tradition to let = denote a comparison for equality, a predicate that is either true or false. But Fortran made this symbol mean assignment, the enforcing of equality. In this case, the operands are on u…

Lisp, the second oldest language after Fortran, didn't make this mistake. In Lisp, "=" isn't an operator at all. Assignment is (setf x y) and comparison is (eq x y) [and several variants of eq].

Common Lisp and related languages have = as a function: it is a numeric comparison. Like under equalp, (= 1 1.0) yields true. You might think it's superfluous to equalp, but has some virtues of its own, like supporting variadic arguments (= 1 1 1 1) and rejecting non-numeric arguments.

eq is often the wrong one to use: two instances of the same number can fail to be eq.

Re: The Bosque Programming Language

#172
post #165
post #160

> The categorization and coverage results of these semantic loop idioms shows that almost every loop a developer would want to write falls into a small number of idiomatic patterns which correspond to higher level concepts developers are using in the code, e.g., filter, find, group, map, etc. The fact that there are idioms that they could use doesn't mean those idioms are natural to the way people think, in particula…

People have problem with the question "Imagine you're trying to find the (maximum distance) of all the stars in the sky" because the maximum distance of all stars is ill defined and nonsensical. Maximum distance to what? To the center of universe? To the edge of the universe? To my house? Or the furthest distance between two stars of all the stars? Half of the solution is stating the correct question.

You're talking to the person so you just answer questions like that as they come up.
Post reply on HN