Re: [dev] less lines of code suck less

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Tue, 4 May 2021 06:08:57 +0200

On Mon, 03 May 2021 19:40:04 -0400
"Greg Reagle" <greagle_AT_fastmail.fm> wrote:

> > Would sbase suck less if the program head, which is currently a C
> > program of 77 lines, were replaced with something like
> > #!/bin/sh
> > sed "$1"q

Not really because although head is pretty simple, it's a bit more
complex than that, you need to handle command parameters, have a
default line numbers, and print filenames if several of them are passed
(IIRC that's all).

> Here it is in 37 lines of glorious rc shell code. Note that head.c also depends on several functions in libutil, so it is more than 77 lines really.
>
> #!/usr/bin/env rc

And how many “lines” for env and rc dependencies?
Received on Tue May 04 2021 - 06:08:57 CEST

This archive was generated by hypermail 2.3.0 : Tue May 04 2021 - 06:12:09 CEST