guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing a procedure in different style


From: Zelphir Kaltstahl
Subject: Re: Writing a procedure in different style
Date: Mon, 21 Dec 2020 22:29:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hey Tomas,

On 12/21/20 1:31 PM, tomas@tuxteam.de wrote:
> On Sun, Dec 20, 2020 at 06:57:34PM +0100, Zelphir Kaltstahl wrote:
>> Hello Tomas!
>>
>> I think you are right about it only being down one stack frame down. The
>> checks are performed on what contains the next thing which is recurred on.
> Nice explanation :)
>
>> For a moment I thought "But isn't the null? check done twice in the
>> first cond part?" [...]
> This is one of the fantastic (and scary) things I often experience
> in this (scheme-y) context (take SICP, or the Little Schemer).
>
> Everything looks so easy, but whenever I try myself, I realise that
> I've been taken along a path along high mountains, with breathtaking
> views, and down there it gets messy and there are crocodiles.
>
> It takes a long time to massage one's messy, lowly programs into a
> form which approaches that deep beauty.

I definitely agree!

When I went through the book and also through some SICP exercises, I was
amazed by how much is contained in just a short snippet of code and how
nuanced it can be.

I wonder how much crap code I write on the job, when I am not given as
much time, as I take in my free time, and even in my free time, I often
notice, that I could have written things more succinctly or in a more
idiomatic way or that some special case was not covered. If I look at my
time spent on writing code in a functional style, while trying to not
unnecessarily increase runtime complexity, compared with time spent on
code, that makes use of mutation or even global state, simply hoping
that things will work out later, I also get an idea of how much more one
can think about a short program and how much more there is to think about.

Writing code, a simple thing to learn, a very long (never ending)
journey to master.

I hope that the whole virus stuff will be over soon and I manage at some
point to join an event in the e-lok (it was e-lok something, wasn't it?) ; )

Best regards,
Zelphir

-- 
repositories: https://notabug.org/ZelphirKaltstahl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]