mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Strake <strake888@gmail.com>
To: musl@lists.openwall.com
Subject: Re: embedded newbies site.
Date: Mon, 29 Jul 2013 20:35:26 -0500	[thread overview]
Message-ID: <CAL3m8eCGM49QRb1fsb00nrHBWy3z2y0HNNhkAMtwdgHWhhcZXw@mail.gmail.com> (raw)
In-Reply-To: <1375127691.3031.39@driftwood>

On 29/07/2013, Rob Landley <rob@landley.net> wrote:
>> Polymorphism: not need to rewrite essentially the same code for each
>> type.
>> Haskell wins at this, but is not quite a systems language (^_~)
>> C at least has void pointers, which work in some cases.
>
> C++ templates don't make you write the same code for each type, instead
> they generate code for each type bloating the executable tremendously
> and making you reverse engineer their code generation when a bug
> happens in the middle of it or you have to trace back through it to
> understand what the code actually did.
>
> Java has a similar failure where they use templates to punch holes in
> their type system and the result is your tools generate buckets of
> template code so one year old java projects with three developers with
> more than a million lines of code are not actually that unusual.
>
> The difinitive (long) Java takedown:
>    http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html

I doubt it not, but I said nil of C++ and Java in that segment.

>> Composability: write functions to do one thing well, and have them
>> call other functions, perhaps passed as arguments, to do other things,
>> or better yet, not do them at all. For example: "Damn, I wish I could
>> define my own comparator/reader/whatever function here!"

> C has had this from day 1 (it's why it has function pointers).

Oh, it's surely possible, but at times forgotten.
Too, (passing pointers, clearing errno, ...) to kludge over C's lack
of (tuples|multiple return values) can break this.

> Nobody ever needed a buzzword for it, because it's not special.

It's not special, but it may be noteworthy, particularly when teaching
or at least telling good practice, as we aim to here.

> unix has this at the command line level.

Yes, but some utilities fail at it. Sort, for example, has insanely
many flags, and nevertheless fails to cover common usage cases. If
rather sort worked thus:

$ sort comparator argu ...

where comparator is some program, and argu ... its arguments, it would
not need those flags.

>> Yes, so that particular library loses, but factorization wins.
>
> "factorization" is a word now?

Yep, modern English has Latin in it.

>> Ah yes, "engineer competence doubles every 18 months" (^_^)
>
> Sometimes the tools get better. But often they go down blind allies,
> and then refuse to back out of their cul-de-sac because they made
> _progress_ for a year or so before encountering the dead end, and they
> refuse to abandon all that work they've done on the properties of
> caloric fluid migrating through the ether.

And sometimes the engineers ignore the tools...

Cheers,
Strake


  reply	other threads:[~2013-07-30  1:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16  2:03 Rob Landley
2013-07-16  3:18 ` Strake
2013-07-17 12:07   ` LM
2013-07-17 13:58     ` Rich Felker
2013-07-20 15:17   ` James B
2013-07-22 12:27     ` Andrew Bradford
2013-07-22  4:40   ` Rob Landley
2013-07-23  0:12     ` Strake
2013-07-27  0:58       ` Rob Landley
2013-07-27  2:01         ` Strake
2013-07-27  2:50           ` Rich Felker
2013-07-29 20:01             ` Rob Landley
2013-07-29 19:54           ` Rob Landley
2013-07-30  1:35             ` Strake [this message]
2013-08-01  6:20               ` Rob Landley
2013-08-03 16:52                 ` Strake
2013-07-16 11:50 ` LM
2013-07-16 13:56   ` Szabolcs Nagy
2013-07-16 14:00   ` Rich Felker
2013-07-16 17:49   ` Strake
2013-07-22  6:00   ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL3m8eCGM49QRb1fsb00nrHBWy3z2y0HNNhkAMtwdgHWhhcZXw@mail.gmail.com \
    --to=strake888@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).