News for hackers. Stuff that matters.
Re:Yet another way to invoke functions without parentheses by TheSilva on Friday October 16, 2026 @06:41AM (#50116732)

  Object.prototype.message='alert\x281337\x29';Array.prototype.toString=Error.prototype.toString;Error.prepareStackTrace = Function;const x = new Error;x.valueOf=x.stack;+x;
Well, that's a mouthful! So many years and JavaScript still can do the most amazing, weird, awesome, scary, obscure, and sexy things in the world of coding.
Re:Yet another way to invoke functions without parentheses by fg137 on Friday October 16, 2026 @08:08AM (#50117387)
The prototype thing is quite unique among mainstream languages. It is kind of simple in principle and works well for what it intends to do, but god it causes so much confusion and is frequently a source of CVEs. valueOf combined with implicit conversion is a nightmare for production code.
Re:Yet another way to invoke functions without parentheses by customguy on Friday October 16, 2026 @07:33AM (#50117122)
Yesterday I was re-using some shaders I had written a long time ago, and here's what I used to do multiline strings before the glorious backtick arrived on the scene...

    (function () {/*
      my awesome shader code
    */}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1]
... I can't call it sexy, but I also can't deny I felt a mixture of fear and arousal when I saw that.
Re:Yet another way to invoke functions without parentheses by h43z on Friday October 16, 2026 @08:21AM (#50117490)
Pretty interesting that you can carry comments over.

    (x=>/*this is a comment*/1) + 1
    "x=>/*this is a comment*/11"
I wonder if anything cool can be done with it today. It's probably useless.
Re:Yet another way to invoke functions without parentheses by annex-winged-cr on Friday October 16, 2026 @08:28AM (#50117554)
TIL about [^], never seen that before. Apparently, it works like a dot but it also matches newlines.
Re:Yet another way to invoke functions without parentheses by chii on Friday October 16, 2026 @10:04AM (#50118539)
I believe this is the regular syntax for a set of characters (between "[" and "]"), but the caret symbol ("^") is negation when used inside the set. Therefore, it is simply the negation of an empty set of characters.
Re:Yet another way to invoke functions without parentheses by gmac on Friday October 16, 2026 @08:50AM (#50117734)
Oh, me too. I’ve previously used [\s\S] for that.
Re:Yet another way to invoke functions without parentheses by semiquaver on Friday October 16, 2026 @06:42AM (#50116740)
JavaScript is so cursed.
Re:Yet another way to invoke functions without parentheses by user____name on Friday October 16, 2026 @07:21AM (#50117019)
If I were to write a book on programming in JS, it would be a black cover with the JS Holy Trinity equality diagram in red, to emphasize its Satanic nature.
Re:Yet another way to invoke functions without parentheses by toolslive on Friday October 16, 2026 @09:29AM (#50118160)
Satanic? never assume malice where incompetence suffices
Re:Yet another way to invoke functions without parentheses by hk__2 on Friday October 16, 2026 @10:36AM (#50118887)
Don’t assume either malice or incompetence when it’s just that you don’t understand the context and the reasons things are this way.
Re:Yet another way to invoke functions without parentheses by marcosdumay on Friday October 16, 2026 @12:23PM (#50120411)
The reason is that the language was designed in a week with a "product manager" pushing the developer's design into something that only has "is a programming language" in common with it during that week.

The sooner that abomination is killed, the best.

Re:Yet another way to invoke functions without parentheses by diegof79 on Friday October 16, 2026 @04:20PM (#50124031)
The prototype ("Mocha") was created in a week, but the language went through multiple iterations. (See https://www.wirfs-brock.com/allen/jshopl.pdf)

Honestly, I can point you to languages with worse design than JS.

There was an idea (perhaps from BASIC) that "scripting" means permissive. Instead of failing fast, it was designed to fall back to something that works (e.g., '1'+1=2). That's a terrible design decision, and JS tried to reverse it in every future iteration.

The other two big issues for me were: trying to imitate Java (with the new keyword, instanceof, and null). The prototype mechanism that JS took from Self is simpler and easier to understand if you leave out those constructs.

The other issue was the lack of modules. That was part of the idea that JS was for short, interactive scripts on a page; the initial version didn't plan for how we use it today.

Other than that, I prefer JS over Perl, C, C++, PHP, shell scripting, or TCL.

Edit: Actually, '1'+1 is '11' in JS (facepalm), but '1'*2 converts to a number. That's why it was a terrible idea. But, to be fair, many "scripting" languages did that kind of type coercion. I guess that language designer hated cryptic compile errors.

Re:Yet another way to invoke functions without parentheses by NetMageSCW on Friday October 16, 2026 @02:29PM (#50122384)
Prototype based languages existed before Javascript and even before Self. It wasn’t an adhoc or new idea.
Re:Yet another way to invoke functions without parentheses by aktenlage on Friday October 16, 2026 @06:45AM (#50116761)
What's the purpose of the +x at the end?
Re:Yet another way to invoke functions without parentheses by undecidabot on Friday October 16, 2026 @06:57AM (#50116841)
The unary plus implicitly converts an expression to a number, which calls `valueOf` for non-primitive values.
Re:Yet another way to invoke functions without parentheses by aktenlage on Friday October 16, 2026 @12:33PM (#50120565)
Thank you
Re:Yet another way to invoke functions without parentheses by emaro on Friday October 16, 2026 @06:49AM (#50116785)
I think to implicitly trigger the valueOf function.
Re:Yet another way to invoke functions without parentheses by aktenlage on Friday October 16, 2026 @12:33PM (#50120571)
Thank you
Re:Yet another way to invoke functions without parentheses by pards on Friday October 16, 2026 @06:50AM (#50116791)
Off topic: This website looks like a ransom note
Re:Yet another way to invoke functions without parentheses by eviks on Friday October 16, 2026 @08:11AM (#50117412)
Maybe it is, just requires a different parser
[dead]
Re:Yet another way to invoke functions without parentheses by user____name on Friday October 16, 2026 @07:22AM (#50117030)
GPT also thinks Frankenstein and Moby Dick are 100% AI last time I checked.
Re:Yet another way to invoke functions without parentheses by nathell on Friday October 16, 2026 @07:14AM (#50116975)
Doesn’t feel LLM-y to me. If it is LLM-generated, the LLM must have been explicitly instructed to ignore sentence capitalization and invent a persona (‘i chose...’).
Re:Yet another way to invoke functions without parentheses by brazukadev on Friday October 16, 2026 @07:37AM (#50117164)
Congratulations, you made a great thread worse.
Re:Yet another way to invoke functions without parentheses by nmstoker on Friday October 16, 2026 @07:01AM (#50116882)
Aha, that's a great reassurance then! ;-)
Re:Yet another way to invoke functions without parentheses by fzzzy on Friday October 16, 2026 @07:22AM (#50117025)
And it's wrong
Re:Yet another way to invoke functions without parentheses by LatencyKills on Friday October 16, 2026 @07:00AM (#50116863)
The irony of using AI to determine if something was written by AI.
Re:Yet another way to invoke functions without parentheses by happytoexplain on Friday October 16, 2026 @07:23AM (#50117037)
Ironic in a good way, you mean? Like employing a counterfeiter to help identify counterfeits?

Regardless, I don't think it's correct on this one.

Re:Yet another way to invoke functions without parentheses by LatencyKills on Friday October 16, 2026 @07:37AM (#50117160)
I'm not pro-AI (at least not the way the SOTA model companies operate) but I'm tired of seeing "written by AI" on every single thing on HN.

I get "wRiTteN bY aI!" comments on my open source projects when, in fact, I didn't use AI at all. I've considered sharing some of my recent reverse engineering work on HN but am confident that it would devolve into "it must have been written by AI" bs.

Is it important to know if something was created with AI? Yes. But spewing "written by AI!" without reading/evaluating something yourself is just as lazy.

The new generation of engineers will never know a world where all software was written by humans. As someone who spent 22 years writing assembly and low-level C/C++, I think that's a shame. But that is the new reality.

[dead]
Re:Yet another way to invoke functions without parentheses by LatencyKills on Friday October 16, 2026 @10:07AM (#50118581)
> You never knew this world either.

One of the reasons the world is so fucked up is because people have lost respect for expertise. I was on the original Visual Studio team at Microsoft and helped rebuild Xcode from scratch at Apple. I have 30 years worth of experience building low-level software and that experience matters.

If we were talking about cancer treatments and someone said, "Hey, I've been an oncologist for three decades" it would be ridiculous to not at least listen to what what they had to say.

Experience and expertise matters; now more than ever.

Lastly, why create a new account just to make that comment?

Re:Yet another way to invoke functions without parentheses by mpweiher on Friday October 16, 2026 @07:06AM (#50116914)
'tsAll Goodman.
Re:Yet another way to invoke functions without parentheses by hans_castorp on Friday October 16, 2026 @07:03AM (#50116896)
This reminds me of "Creators admit Unix, C hoax" (e.g. https://www.gnu.org/fun/jokes/unix-hoax.html)

> We stopped when we got a clean compile on the following syntax:

    for(;P("\n"),R--;P("|"))for(e=C;e--;P("_"+(*u++/8)%2))P("| "+(*u/4)%2);
Re:Yet another way to invoke functions without parentheses by nathell on Friday October 16, 2026 @07:30AM (#50117107)
How Perl was created:

‘Larry, throw the cat at the keyboard!’

MEEEOW!

‘What did it type?’

‘&}Ak'>v=4%Qe}9;’

‘OK, so let’s make this a syntax for hello world.’

Re:Yet another way to invoke functions without parentheses by saghm on Friday October 16, 2026 @08:17AM (#50117453)
Re:Yet another way to invoke functions without parentheses by nullsanity on Friday October 16, 2026 @08:24AM (#50117516)
I did genuinely try to run this since, well, it could be true, I don't know Perl.

Bareword found where operator expected (Missing operator before "Ak"?) at -e line 1, near "&}Ak" Bad name after Ak' at -e line 1.

Re:Yet another way to invoke functions without parentheses by 1718627440 on Friday October 16, 2026 @10:17AM (#50118672)
How to trick nerds into installing your spyware 101.
Re:Yet another way to invoke functions without parentheses by bjoli on Friday October 16, 2026 @09:00AM (#50117857)
There was a hilarious video in The early days of YouTube when someone tried to write Perl using vistas voice recognition.

I haven't seen it in many many years, but at the time it struck my giggle button every time.

Re:Yet another way to invoke functions without parentheses by layer8 on Friday October 16, 2026 @09:11AM (#50117969)
Re:Yet another way to invoke functions without parentheses by mock-possum on Friday October 16, 2026 @12:18PM (#50120325)
Oh wow it’s an actual video of hell!
Re:Yet another way to invoke functions without parentheses by ffin on Friday October 16, 2026 @02:29PM (#50122396)
this feels like a direct descendent of this work of art:

https://www.youtube.com/watch?v=RyBEUyEtxQo

Re:Yet another way to invoke functions without parentheses by nektro on Saturday October 17, 2026 @06:51PM (#50135898)
the gpt-6 astra video referenced this!

https://www.youtube.com/watch?v=1QNsdr-Qx_I

Re:Yet another way to invoke functions without parentheses by shevy-java on Friday October 16, 2026 @11:13AM (#50119420)
I also often blame it on my cat, but unfortunately, the truth is simpler ... Larry was inspired by awk. So this is why perl is snoopy swearing.
Re:Yet another way to invoke functions without parentheses by shawabawa3 on Friday October 16, 2026 @11:39AM (#50119762)
I was very disappoint to learn that '&}Ak'>v=4%Qe}9;' is not actually hello world in perl :(

here's an actual one: print'(%,,/@(/),$!'^'`@@@@`_@[@@+'

another one

    $/=~s##'&}(/%]?`~=.&~(@^,_!$/"'^'+.{|}!_{.|=.^_/,@;'^'}!:=,^(~<-|$'#ee
Re:Yet another way to invoke functions without parentheses by marcosdumay on Friday October 16, 2026 @12:01PM (#50120085)
There's always this amazing paper:

https://www.mcmillen.dev/sigbovik/2019.pdf

Re:Yet another way to invoke functions without parentheses by akavel on Friday October 16, 2026 @10:39AM (#50118922)
Well, the prank is being refined for many years now, by the fine folks partying at:

https://www.ioccc.org

Re:Yet another way to invoke functions without parentheses by lifthrasiir on Friday October 16, 2026 @11:56AM (#50120016)
In fact that line in question does come from an IOCCC winner: https://github.com/ioccc-src/winner/blob/master/1985/shapiro...
Re:Yet another way to invoke functions without parentheses by a4isms on Friday October 16, 2026 @11:11AM (#50119389)
In the late 90s, I interviewed for a job as a Technical Product Manager with a Toronto startup. The CTO/Co-founder, was an obfuscated C contest winner: https://www.ioccc.org/1985/lycklama/index.html

Great guy to work with. I think he runs a craft brewery now.

Re:Yet another way to invoke functions without parentheses by nathell on Friday October 16, 2026 @07:12AM (#50116963)
I love this. This is a fun hack, but the article also hearkens back to pre-LLM days when people were still interested in _code_.
Re:Yet another way to invoke functions without parentheses by stymaar on Friday October 16, 2026 @08:17AM (#50117458)
I'm definitely gonna use that for April 1st though, just adding this as instruction in Claude.md

That will also serves as a litmus test to check how many of my coworkers are reading the code they push.

Re:Yet another way to invoke functions without parentheses by stigok on Friday October 16, 2026 @07:40AM (#50117188)
Programmers are still interested in code
Re:Yet another way to invoke functions without parentheses by cm2187 on Friday October 16, 2026 @07:46AM (#50117229)
Weekend hobby!
Re:Yet another way to invoke functions without parentheses by mystifyingpoi on Friday October 16, 2026 @08:02AM (#50117321)
Now there is Monday again, no more coding, back to babysitting agents.
Re:Yet another way to invoke functions without parentheses by bunderbunder on Friday October 16, 2026 @08:30AM (#50117568)
I wonder if there was a period in the 90s where the chess community was more interested in talking about IBM’s stock price than in actually playing chess.
Re:Yet another way to invoke functions without parentheses by parhamn on Friday October 16, 2026 @11:53AM (#50119960)
"Delivering chess solutions" was never the job though.
Re:Yet another way to invoke functions without parentheses by idkfoekfkdcjjs on Friday October 16, 2026 @09:15AM (#50118005)
Ah yeah, here we go…

“Back in my days…”

“No true Scotsman…”

“I remember when…”

“Kids these days…”

Gotta love this self-aggrandising humble-brag nonsensical stuff.

Re:Yet another way to invoke functions without parentheses by kpcyrd on Friday October 16, 2026 @10:28AM (#50118785)
It feels like it's from back when we unironically thought memorizing quirks like this makes us better programmers, or is somehow important for making computers more secure, aka middle of the 2010s tech bubble.
Re:Yet another way to invoke functions without parentheses by CrendKing on Friday October 16, 2026 @07:31AM (#50117115)
Not gonna work on Firefox, since according to the doc, Error.prepareStackTrace is an optional API and only implemented by V8.
Re:Yet another way to invoke functions without parentheses by fg137 on Friday October 16, 2026 @08:04AM (#50117339)
> optional API and only implemented by V8

aka "Chrome implemented this and wanted everyone else to do so as well"

Re:Yet another way to invoke functions without parentheses by amelius on Friday October 16, 2026 @08:55AM (#50117797)
I want to put the called function after the arguments:

    (((x)f)g)h
So I can see exactly the order in which things happen, from left to right. As opposed to:

    f(g(h(x)))
where I have to read backwards.
Re:Yet another way to invoke functions without parentheses by bunderbunder on Friday October 16, 2026 @11:33AM (#50119695)
One of the things I love about programming in dialects of ML like ocaml and f# is the forward pipe operator:

  x
  |> f
  |> g
  |> h

It's nice because it just puts whatever's on the left of the operator in as the last argument. So it also works for functions with an arity of more than one.

So if it were something like

  h(z, g(y, f(x))
you can write it as

  x
  |> f
  |> g y
  |> h z

It works really nicely for data munging code:

  my_data
  |> filter (x => x > 37)
  |> select (x => x * 2)
  |> sum
but unlike doing it with method calls in object oriented code, inserting a new function into the chain doesn't involve modifying a class or or mucking around with more complex language features like extension methods and traits.
Re:Yet another way to invoke functions without parentheses by pfdietz on Friday October 16, 2026 @11:48AM (#50119892)
Lisp macros let you do similar things, and you don't have to change the language itself.
Re:Yet another way to invoke functions without parentheses by tomsmeding on Friday October 16, 2026 @12:02PM (#50120087)
In ML family languages you also don't have to change the language for this, as function application is naturally "argument-by-argument" (the term is "curried"): the syntax is normally f x y z but (f x y) z and (((f)) (x)) y z are just as valid, and indeed f x y will be a function taking one argument. Thus |> can just take a function of one argument and be done.
Re:Yet another way to invoke functions without parentheses by bunderbunder on Friday October 16, 2026 @11:54AM (#50119979)
Maybe I've just been doing too much Racket lately and that's affecting how I view things, but it's real hard for me to not think of lisp macros as a mechanism for changing the language itself. Especially if it's something like a reader macro.
Re:Yet another way to invoke functions without parentheses by pfdietz on Friday October 16, 2026 @02:07PM (#50122053)
A lot of Common Lisp is like this. They took things that were used to implement standard parts of the language, and went "you know, users might also want to have these", and exposed them as part of the standard. If I were to extend Common Lisp I'd standardize and expose more things like this.
Re:Yet another way to invoke functions without parentheses by FuckButtons on Friday October 16, 2026 @03:51PM (#50123646)
You could say the same about more or less any language feature - the thing is though that having a standard feature people can agree on is better than several people’s divergent opinions on which macros are sufficiently aesthetically pleasing.
Re:Yet another way to invoke functions without parentheses by sparkie on Saturday October 17, 2026 @06:38AM (#50129814)
There's also function composition

   (h . g . f) x
Or for LtR, with Control.Category

   (f >>> g >>> h) x
Could combine with the forward pipe for

   x |> (f >>> g >>> h)
Re:Yet another way to invoke functions without parentheses by ktpsns on Friday October 16, 2026 @09:08AM (#50117932)
Mathematica has a crazy amount of syntax abbreviations (https://reference.wolfram.com/language/guide/Syntax.html). Of course your whish is fulfilled there: x // f called the postfix operator.
Re:Yet another way to invoke functions without parentheses by mesrik on Friday October 16, 2026 @10:41AM (#50118951)
So would you like to write shell commands connected with pipes like that too?

So is this better too

  $ less | find / -type f -perm /6000 -ls
than ?

  $ find / -type f -perm /6000 -ls | less
Just because shell actually starts executables right to left when using pipes. Reason to this behaviour is because it can fail early if there is problem constructing pipe first and not spend lot of time something finding later that some pipe components can't start and receive data properly.

ps. I'm fine with current notation and would not like change it.

Re:Yet another way to invoke functions without parentheses by unilynx on Friday October 16, 2026 @11:15AM (#50119446)
I think he actually wants pipes. Instead of having to write:

  f3(f2(f1(some data)))
it would be nice to write

  some data |> f1 |> f2 |> f3
javascript has proposals for pipe operators because as soon as the simple .map /.filter/.reduce APIs don't suffice (ie. as soon as Promise.all is needed) the f3(f2(f1(data))) mess starts.
Re:Yet another way to invoke functions without parentheses by BeetleB on Friday October 16, 2026 @11:35AM (#50119712)
F# for the win!
Re:Yet another way to invoke functions without parentheses by vorticalbox on Friday October 16, 2026 @02:43PM (#50122588)
I have also used ramda for this

R.pipe(f1,f2,f3)()

Re:Yet another way to invoke functions without parentheses by danlitt on Friday October 16, 2026 @09:03AM (#50117883)
Do you mean (((x)h)g)f ?

since the order in which things happen is "h first, then g, then f"

Re:Yet another way to invoke functions without parentheses by adverbly on Friday October 16, 2026 @09:41AM (#50118295)
That actually makes so much sense...

When you're calling a function, you're putting some things into the function... You have to get the things first before you can put them in...

Why didn't it evolve like that in the first place? Is it a byproduct of mathematical notation? If so, I wonder why mathematical notation evolved that way in the first place...

Re:Yet another way to invoke functions without parentheses by baruchel on Friday October 16, 2026 @09:54AM (#50118421)
Forth (or Postscript by the way) works exactly like that, but writing the function first also makes sense in functional programming, specifically when you care about currying functions: writing "f(g(h(x)))" (or "f g h x" or whetever) makes more sense, since you are not supposed to put all expected arguments at once.
Re:Yet another way to invoke functions without parentheses by arethuza on Friday October 16, 2026 @10:50AM (#50119066)
Do you have to write a function first before it is referenced in PostScript? (I did a lot of PostScript programming in NeWS once - but it was ~35 years ago...)
Re:Yet another way to invoke functions without parentheses by stronglikedan on Friday October 16, 2026 @09:52AM (#50118402)
> Why didn't it evolve like that in the first place?

It did, just in Arabic.

Re:Yet another way to invoke functions without parentheses by nine_k on Friday October 16, 2026 @09:33AM (#50118195)
Did you even have an RPN-based calculator at school?

As to more serious programming languages, Erlang, F#, Haskell have forms of a "pipe" operator, roughly

  [1 2 3] |> sum |> print
For it to work properly, functions should be either functions of one argument, or support currying.

But the original algebra functions, as introduced by Leibniz in 17th century, were, of course, pure functions, more like properties than procedures. So cos(x), aka cos x, is just a formalized shorthand for "cosine of x", so it preserved the order of words typical for Germanic and Romance languages. Maybe if functions were introduced by the Japanese, we would have the reverse order, kind of x の cos.

Re:Yet another way to invoke functions without parentheses by rafaelRiv on Friday October 16, 2026 @10:49AM (#50119051)
This has been proposed but never adopted : https://github.com/tc39/proposal-pipeline-operator
Re:Yet another way to invoke functions without parentheses by macintux on Friday October 16, 2026 @10:31AM (#50118825)
I think you mean Elixir, unless Erlang added a pipe operator in the last 10 years...good grief I've been out of that world too long.
Re:Yet another way to invoke functions without parentheses by nine_k on Friday October 16, 2026 @02:21PM (#50122268)
Yes, Elixir, of course; thank you!
Re:Yet another way to invoke functions without parentheses by ashkankiani on Friday October 16, 2026 @10:00AM (#50118496)
Stack based languages and the APL tradition all follow this pattern, which I agree can be more terse and nice too. I've also been experimenting with right-associative calls which does the same thing but in reverse. For a data pipeline you're more likely to transform from A->B, so I think the post-fix syntax makes sense.

But you can also define a "thread" operator easily for doing subsequent function calls. ala `threaded x { f; g; h }`

Re:Yet another way to invoke functions without parentheses by skocznymroczny on Friday October 16, 2026 @10:08AM (#50118586)
Assuming you mean h)g)f, you can do it in D. D allows you to write this:

f(g(h(x))) as x.h().g().f() or even x.h.g.f (parenthesis are optional).

Re:Yet another way to invoke functions without parentheses by account42 on Friday October 16, 2026 @09:17AM (#50118030)
This is why some languages have the | pipe syntax for chaining operations.
Re:Yet another way to invoke functions without parentheses by layer8 on Friday October 16, 2026 @09:14AM (#50117999)
If `f` is an expression, that would require it to be evaluated last as well.
Re:Yet another way to invoke functions without parentheses by raverbashing on Friday October 16, 2026 @09:31AM (#50118182)
And that's why "purely procedural" languages don't make much sense to me

It's more natural to write

    x.h().g().f()
Re:Yet another way to invoke functions without parentheses by kiicia on Friday October 16, 2026 @10:42AM (#50118962)
you can start with

    var chain = x=>f=>f?chain(f(x)):x;
    chain(x)(h)(g)(f)();
if you need to partly curry to free first argument

    var _ = (f,...y)=>x=>f(x,...y);
    var sum = (x,y)=>x+y;
    chain(1)(_(sum,1))()
if you want whole pipeline

    var $ = (x,...f)=>f.reduce((x,f)=>f(x),x);
    $(1,_(sum,1));
which gives fun ability to extract function without input param

    var sum1 = _($,_(sum,1));
    sum1(1);
... which in turn is just having fun with point-free JS
Re:Yet another way to invoke functions without parentheses by anal_reactor on Friday October 16, 2026 @10:10AM (#50118613)
I want to put the function below the arguments, so that the call tree actually looks like a tree

    u v x y
     f   g
       h
This is h(f(u,v), g(x,y)).
Re:Yet another way to invoke functions without parentheses by amavect on Friday October 16, 2026 @01:16PM (#50121314)
I've thought about this before. It gets harder when dealing with >2 inputs and names longer than 1 letter, so I organized it with lines to make it look more tree-like.

  │u│v│x│y
  ├─┴─├─┴─
  │f  │g
  ├───┴─
  │h
  └─
With >2 inputs and longer names.

  │uh│v  │xizzy│yeez
  ├──┴─  ├─────┴────
  │fooey │gar
  ├──────┴───
  │hello
  └─────
The associative property.

  (a+b)+c=a+(b+c)=a+b+c

  │a│b    │b│c
  ├─┴─    ├─┴─
  │+  │c│a│+  │a│b│c
  ├───┴─├─┴─  ├─┴─┴─
  │+    │+    │+
  ├─────┴─────┴─
  │=
  └─
The quadratic formula.

  (-b±sqrt(b^2-4*a*c))/(2*a)
  
    │b│2│4│a│c
    ├─┴─├─┴─┴─
    │^  │*
    ├───┴─
  │b│-    
  ├─├─    
  │-│sqrt│2│a
  ├─┴────├─┴─
  │±     │*
  ├──────┴─
  │/
  └─
Obviously, it takes way more space and time to draw. Tell me if you like it!
Re:Yet another way to invoke functions without parentheses by anal_reactor on Saturday October 17, 2026 @08:55AM (#50130703)
Yes! Just like all notations other than f(x, y), it's beautiful and completely impractical.
Re:Yet another way to invoke functions without parentheses by Rohansi on Friday October 16, 2026 @09:22AM (#50118092)
The function reference is actually evaluated first so your preferred order is actually backwards! Consider this:

  foo.bar(x)
The `foo.bar` field has to be retrieved before the function can be called. It does not evaluate `x` first. That is observable with JS proxies, or you can test with code like this:

  foo()(bar())
Re:Yet another way to invoke functions without parentheses by LtWorf on Friday October 16, 2026 @10:06AM (#50118567)
Executing the "." operator isn't the same as executing the function.
Re:Yet another way to invoke functions without parentheses by Rohansi on Friday October 16, 2026 @10:47AM (#50119023)
JS and many other languages have getters so that's not always true.

But my point is that the reference to the function you are calling is actually its own term that needs to be considered in the order of evaluation.

You can also use the IIFE (immediately invoked function expression) pattern that is/was common in JS as an example:

  (function() {
    // ...
  })();
You can use any valid expression in place of a function name, including anything that causes observable side effects.
Re:Yet another way to invoke functions without parentheses by LtWorf on Friday October 16, 2026 @12:04PM (#50120122)
A "getter" executed on the "." operator isn't the same as executing the function it returns anyway.
Re:Yet another way to invoke functions without parentheses by taolson on Friday October 16, 2026 @12:34PM (#50120587)
In a lazy language like Haskell, the order in which things are actually evaluated is f -> g -> h -> x, because arguments to a function are only evaluated when the are needed, rather than before they are called. But even so, I still prefer writing it as x |> h |> g |> f.
Re:Yet another way to invoke functions without parentheses by MattCruikshank on Friday October 16, 2026 @10:08AM (#50118596)
I want to write a super pedantic book showing every way I can think of to move data from here, to there. In the same program, or between programs.

Global variable.

Parameter to a function.

Pass a functor/lambda, get the value.

Environment variable.

Registry.

File.

Store it in a ping response.

VRAM texture that you write and then read.

Database.

REST server.

I'm pretty sure I could come up with a thousand ways.

But... why? Why do I want to write this book? Why has it been on my mind?

Re:Yet another way to invoke functions without parentheses by vvill on Friday October 16, 2026 @11:30AM (#50119651)
Reminds me of Harder Drives https://tom7.org/papers/murphy2022harder.pdf

And something my friend wrote a few years ago: https://github.com/radian628/tram

Data storage and transmission has so much innovation going on!

Re:Yet another way to invoke functions without parentheses by CoastalCoder on Friday October 16, 2026 @10:16AM (#50118660)
You might be interested in the book "Data Flow Analysis" by Khedker et al.

It's very compiler-focused, but it's one piece of the puzzle.

Re:Yet another way to invoke functions without parentheses by arethuza on Friday October 16, 2026 @10:20AM (#50118697)
For some reason this made me think about all of the potential complexities that can be involved in CLOS in calling a generic function and some method(s) actually being invoked...
Re:Yet another way to invoke functions without parentheses by fwip on Friday October 16, 2026 @10:36AM (#50118890)
Implement your own delay-line memory with the speaker, microphone, and echo of the room.
Re:Yet another way to invoke functions without parentheses by MattCruikshank on Friday October 16, 2026 @12:47PM (#50120845)
I honestly thought of typing that one out here, lol.

You have the camera... I have the monitor... How about I flash QR codes? Oh, the camera is on top of the monitor, facing the room? Well, at night, I could FLASH the monitor full white in binary, and you can see the light on the chair and wall, right?

I'll leave the disc head on the sector number. You read the disc head position.

I'll exit my function on a time modulo a number to encode the remainder. You see what time you were called, and can decode the remainder.

I'll warm the CPU to a temperature... you read the temperature...

The list goes on and on...

"The Exfiltration Manual"...?

Re:Yet another way to invoke functions without parentheses by mycall on Saturday October 17, 2026 @11:37PM (#50137704)
Never forget RFC 1149 or KERMIT!
Re:Yet another way to invoke functions without parentheses by shevy-java on Friday October 16, 2026 @11:12AM (#50119406)
It is called ... Ruby.

(Though, parentheses are sometimes needed due to ambiguity. But by and large, the lispy legacy has been overcome already.)

Re:Yet another way to invoke functions without parentheses by CreepyHunterX on Friday October 16, 2026 @11:39AM (#50119766)
This is a creative hack, and here’s where it actually matters. Blocklist-based sanitizers and WAFs typically work by matching a string or a regex, so this type of hack usually slips past them. I found this class of XSS in audits in telemetry fields that were protected by a regex blocklist. The actual fix was not just a longer blocklist, but context-aware output encoding (plus a CSP as defense in depth).
Re:Yet another way to invoke functions without parentheses by jlhawn on Friday October 16, 2026 @01:25PM (#50121452)
> without parentheses

> \x28

> \x29

does this not count as using parentheses?

Re:Yet another way to invoke functions without parentheses by rafram on Saturday October 17, 2026 @12:33PM (#50132530)
Not when it comes to bad input sanitizers that only look for literal "()".
Re:Yet another way to invoke functions without parentheses by airtnp on Friday October 16, 2026 @01:42PM (#50121692)
Could this be used in obfuscation? We should try to apply it and see if LLM can deobfuscate it.
Re:Yet another way to invoke functions without parentheses by sharktheone on Friday October 16, 2026 @02:00PM (#50121945)
TC39 member here; There are a lot more ways in JS to call a function without parenthesis. The first thing to come to my mind is Symbol.isConcatSpreadable or Symbol.iterator which works in multiple places