Article View: comp.lang.c
Article #2236Re: is wraper on realloc good idea? maybe more wrappers?
From: fir
Date: Sat, 05 Dec 2026 08:24
Date: Sat, 05 Dec 2026 08:24
28 lines
2636 bytes
2636 bytes
Tristan Wibberley pisze: > On 29/11/2026 12:16, fir wrote: >> never used it but generally wrappers on some standard functions >> probably are good idea, or not? > > The art of programming is all about wrapping, wrapping all the way down. > > The compsci way is to write a solution in the language of the problem > domain then interpret that language in a language of the domain of > interpreting that (class of) languages, and so forth until you get to > your preferred system programming language. That's all wrapping and it's > equivalent to looping and recursion without wrapping, just an > alternative expression. > > But it's mostly a waste of time to wrap for the sake of wrapping - > unless you're adding some type annotations/(pre/post)conditions/asserts, > etc. Sometimes you can use the linker for that stuff instead of C. > > I don't know where to place EDSLs there. > > In C++ I sometimes wrap heap-stuff with smart-references because > managing heap allocations is too hard, like chess - the rules are easy > but it's not so easy to play a game; that's /almost/ an EDSL: couching > allocation in terms of lexical scopes. > wrapers can be inlined and that makes them interesting and i suspect i use them too sparingly in some way...and it needs some thought
Technical Details
Message-ID:
<11f0hoj$2j0l9$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11eh538$3fet7$1@dont-email.me> <11f0gtg$2i7jn$3@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: fir <profesor.fir@gmail.com> Newsgroups: comp.lang.c Subject: Re: is wraper on realloc good idea? maybe more wrappers? Date: Sat, 5 Dec 2026 09:24:50 +0100 Organization: A noiseless patient Spider Lines: 28 Message-ID: <11f0hoj$2j0l9$1@dont-email.me> References: <11eh538$3fet7$1@dont-email.me> <11f0gtg$2i7jn$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 05 Dec 2026 08:24:52 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2720425"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KomuQeKUp8UOoWLMImyqeYcOjpWNnEs8="; posting-host="342f4926edf4bd28a33754ba53b7ff2f" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:zydylZcH2y9isBA/a+kOIWDw2cs= sha256:iAo7FSJDj/CuK1bf9CGXjNMTFs+e0rigPmFKA0vPuNo= sha1:gOUwDCUipTNF4K/7GjRzllx3LnI= sha256:s377sxyFXPXYO+s5FUc/omdOn2GFxpnT1zIEsOhZUso= In-Reply-To: <11f0gtg$2i7jn$3@dont-email.me>