Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

BOFH excuse #140: LBNC (luser brain not connected)


comp / comp.lang.scheme / Re: Why is it ok to have an empty begin but no empty lambda?

SubjectAuthor
o Re: Why is it ok to have an empty begin but no empty lambda?Tristan Wibberley

1
Subject: Re: Why is it ok to have an empty begin but no empty lambda?
From: Tristan Wibberley
Newsgroups: comp.lang.scheme
Organization: A noiseless patient Spider
Date: Sat, 2 Mar 2024 15:02 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tristan.wibberley+netnews2@alumni.manchester.ac.uk (Tristan Wibberley)
Newsgroups: comp.lang.scheme
Subject: Re: Why is it ok to have an empty begin but no empty lambda?
Date: Sat, 2 Mar 2024 15:02:26 +0000
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <urvf23$1u718$1@dont-email.me>
References: <628a9855-a13b-42d7-8267-c125c52c55bfn@googlegroups.com>
<d8eab071-8196-421d-b449-099e52e0ea0en@googlegroups.com>
<5d42cd77-f978-4073-a6e6-6d717949d78fn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 2 Mar 2024 15:02:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f35d0a1a33e0186eb06251e729bef78d";
logging-data="2038824"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AAy7pcX98i5BtPM1xTTWOtQz/Zan7uzs2/amQVanrCQ=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:IEIhccQfkLFWLNmlr+IPRQ6hYx4=
Content-Language: en-US
In-Reply-To: <5d42cd77-f978-4073-a6e6-6d717949d78fn@googlegroups.com>
View all headers

On 30/10/2023 15:50, ceving wrote:
> Marc Nieper-Wißkirchen schrieb am Montag, 30. Oktober 2023 um 15:05:05 UTC+1:
>> Because there are at least two different `begin's.
>
> Wow: one symbol with two different meanings. This sounds broken.

Sorry for my other post whose context should have been an earlier
question but which is missing from my newsserver.

For this question, I did an experiment, and it looks like the special
meaning is only for a specific local context, in a define with a
subsequent (values...) expression.

This plurality is caused by the surrounding context and can be expressed
with a single meaning for 'begin' albeit a more complex one than you
would consider in order to not be broken. In particular the behaviour of
'if' that you seemed concerned about is to support programming styles
that suit the simpler meaning of 'begin' that you seem to want.

I am interested to know of programming languages that have no symbols
with meanings that can be expressed such that two different effects can
result from its use in two different contexts, and I don't mean things
that they refer to as symbols, but things which are actually symbols in
general.

I suspect there's no suitable language that satisfies both concerns, in
particular I think elimination of actions must allow the complex
specification of 'begin' in order to also be generally useful, yet
allowing only actions so that symbols can only have a simpler meaning
than has 'begin' will make a language too limited to serve scheme
programmers' purposes.

Perhaps it is the existence of an explicit syntax-checking threshold and
that (begin ...) causes either syntax pass or syntax fail depending on
context? This is common, and often especially desirable, where humans
will use the language.

Personally I don't see why begin shouldn't have always required either
no action and its return value been *unspecified* or always required at
least one action even if it were the nil action, *unspecified*. The
justification for requiring at least one action given in the guile help
is outside the philosophy that allows (if a b) to exist instead of (if a
b *unspecified*), which is that the language is not pure functional so
expressions can have some kind of *unspecified* atom for their results.

1

rocksolid light 0.9.8
clearnet tor