News for hackers. Stuff that matters.
Re:Why I Program in Lisp by wdkrnls on Friday April 11, 2025 @11:11AM (#43654710)
R works exactly as you describe. You can type `+`(1, 2) and get 3 because in R everything that happens is a function call even if a few binary functions get special sugar so you can type 1 + 2 for them as well. The user can of course make their own of these if they wrap them in precents. For example: `%plus%` = function(a, b) { `+`(a, b)}. A few computer algebra systems languages provide even more expressivity like yacas and fricas. The later even has a type system.
Re:Why I Program in Lisp by seanw444 on Friday April 11, 2025 @12:59PM (#43655998)
Similar in Nim as well.
Re:Why I Program in Lisp by ckmate-king-2 on Friday April 11, 2025 @02:09PM (#43656672)
In Standard ML, you can do either 1+2 or op+(1, 2).
Re:Why I Program in Lisp by int_19h on Monday April 14, 2025 @05:06PM (#43686341)
R is much crazier than that because even things like assignment, curly braces, and even function definitions themselves are all function calls. It's literally the only primitive in the language, to which everything else ultimately desugars.