From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3776 Path: news.gmane.org!not-for-mail From: Strake Newsgroups: gmane.linux.lib.musl.general Subject: Re: embedded newbies site. Date: Mon, 29 Jul 2013 20:35:26 -0500 Message-ID: References: <1375127691.3031.39@driftwood> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1375148139 8031 80.91.229.3 (30 Jul 2013 01:35:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Jul 2013 01:35:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3780-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jul 30 03:35:39 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1V3yqg-0000tY-I7 for gllmg-musl@plane.gmane.org; Tue, 30 Jul 2013 03:35:38 +0200 Original-Received: (qmail 25932 invoked by uid 550); 30 Jul 2013 01:35:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 25924 invoked from network); 30 Jul 2013 01:35:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hlz9DaypcseynyrXEnld1d5zQ0XGBvSbvfmOjX3g9oE=; b=YZ3FVWpQGNN8zCC6etV8PKJQx6NrBwt8QUGBdy6y2zifX1iDj3aj2o3q7a/59oqKpk Rtjx8t1QQgclzgqwLDx8gUFePhxP/U2GT1q19arUOYLiutl2kZyfca5NLzQjpDDGn0Fh ZeYVsMXU3LKqeY4C9Rb0ChsVbrs65ukGqZ4oFd8dBxYtXfrTBCb329H92HfKjoz1fnDZ 0g4/tbfYr3zl+HTiDBImapC8w2tV31YkgSwmoR+ISTZab3ldP5c8rdVL5a7ohOhoUq5W 3kz0YUgvFSb9QAy/YWbDIv29XHCyxGFJbOEHrx//seEnTAaj/Mpc861Day/1jY+AhMTk YRTQ== X-Received: by 10.180.83.163 with SMTP id r3mr8861869wiy.10.1375148126476; Mon, 29 Jul 2013 18:35:26 -0700 (PDT) In-Reply-To: <1375127691.3031.39@driftwood> Xref: news.gmane.org gmane.linux.lib.musl.general:3776 Archived-At: On 29/07/2013, Rob Landley 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