News for hackers. Stuff that matters.
Re:First Impressions of the Fortress Language by mnemonicsloth on Friday May 08, 2009 @02:43PM (#600056)
although I'm dubious about the whole "2 x" being the same as "2.x" thing (the * isn't printing. meh)

It might not make much sense from a programming perspective, but it's very natural for a mathematician. The same way that mathematicians are happy with one-letter variable names, they're happy with juxtaposition as their one operator notation. They just redefine everything whenever they start a new problem.

If you think about it, matrix multiplication is a totally different operation from multiplication in the reals. We just happen to use the same notation for it because it follows some of the same rules (associativity, distributivity) that we're in the habit of using to manipulate equations.

This can get pretty extreme. There's a branch of math called functional analysis, which identifies functions with infinite-dimensional vectors, and then does calculus on those "vectors" like they were points in any other space. In their notation,

v = Tu

is like matrix multiplication

y = Ax

except that u and v are functions, and T is some kind of integral.

I think this is one reason the Lisp crowd gets cranky about the parenthesis thing -- the infix operators we all know and love are a lot less well-defined than we think they are.

Re:First Impressions of the Fortress Language by 10ren on Friday May 08, 2009 @04:11PM (#600179)
Regex have a juxtapositional operator (for concatenation). Any others in mainstream languages?
Re:First Impressions of the Fortress Language by chancho on Friday May 08, 2009 @06:50PM (#600396)
Juxtaposition in ML is function application: f x y = f(x,y)

Although you're free to discount ML and its ilk (OCaml, Haskell) as non-mainstream.

Re:First Impressions of the Fortress Language by lacker on Saturday May 09, 2009 @02:13AM (#600768)
This isn't quite the same juxtaposition as math, though. In math you just put single letters next to each other and it's multiplication. But in any programming language enforcing single-letter names would be crazy....
Re:First Impressions of the Fortress Language by simonb on Saturday May 09, 2009 @02:51AM (#600791)
Juxtaposition Mathematica works pretty much the same way as in Fortress. When you multiply a number with a variable you don't even need the whitespace (the pretty printer will however make a "half-space" to ease reading).
Re:First Impressions of the Fortress Language by 10ren on Saturday May 09, 2009 @02:53PM (#601253)
String interpolation in shell, Python etc; and format specification in C-style printf.