3 ms·
> Although Smalltalk solves it by introducing a special method call syntax (which is perfectly fine). Meh. Smalltalk comes from a time when not all languages h
by masklinn 14y ago
> Although Smalltalk solves it by introducing a special method call syntax (which is perfectly fine).
Meh. Smalltalk comes from a time when not all languages had to be ALGOL-style, so it just has its own syntax.
> I was mostly thinking about C-style-method-call-syntax when I wrote this (Perl, Python, JS).
That is no issue, if you have first-class blocks. At most you'll have commas between your blocks because they'll be arguments like every other. Here's a python-ish version using chevrons for blocks:
error = (request.form['username'] != app.config['USERNAME']).then(⟨
"Invalid Username"
⟩, else=⟨
None
⟩)