Date: Mon, 29 Jul 2013 14:54:51 -0500 From: Rob Landley <rob@...dley.net> To: musl@...ts.openwall.com Cc: musl@...ts.openwall.com Subject: Re: embedded newbies site. On 07/26/2013 09:01:48 PM, Strake wrote: > On 26/07/2013, Rob Landley <rob@...dley.net> wrote: > > On 07/22/2013 07:12:39 PM, Strake wrote: > >> On 21/07/2013, Rob Landley <rob@...dley.net> wrote: > >> > What did you have in mind? > >> > >> >> > - efficient (elegant) programming > >> >> > - Why C and scritpting languages, why NOT C++ and autoconf > >> > >> This. Too, why not glib, and other such garbage. > > > > Never having used glib, I'm not qualified to warn people away from > it. > > I used it little, just to hack surf and jumanji, but I found > insanely_long_function_names, poor docs of what allocates or frees > what, wanton type synonyms, and generally a tangled mess. > > I gave up. > > This may not be glib alone, but glib surely seems guilty too. > > > I _have_ used C++ fairly extensively > > this -> beSorry (); > > >> including, particularly, polymorphism and composability. > > > > I don't know what you mean by this. (I remember the buzzwords, > but...) > > 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 > 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!" Um, unix has this at the command line level. C has had this from day 1 (it's why it has function pointers). Nobody ever needed a buzzword for it, because it's not special. > > By "code reuse" I meant it's very easy to suck in a lot of code you > > never have a first user for by grabbing a library that does 1000 > things > > of which you need 3. Environmental dependencies are a form of code > > complexity, but it's invisible because you seem virtuous by > requiring > > the whole gnome library suite for what turns out to be a network > daemon. > > Yes, so that particular library loses, but factorization wins. "factorization" is a word now? > > Alternately, "infrastructure in search of a user" is as bad as > > premature optimization: hold off writing code until you actually > need > > it. > > Worse: it may never save any time at all! It generally costs time. > > My aboriginal linux 260 slide presentation described why native > > compiling under emulation is better than cross compiling. One reason > > was throwing processor time at the problem instead of throwing > > engineering time at the problem. Moore's Law helps with one of > these. > > 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. Rob
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.