October 06, 2018
On Saturday, 6 October 2018 at 18:55:48 UTC, Patrick Schluter wrote:
> On Saturday, 6 October 2018 at 05:36:59 UTC, Paolo Invernizzi wrote:
>>[...]
> In the 90s I used to add the C preprocessor to other languages which lacked efficient constant definition (i.e. compile time constructs). AutoLISP, the LISP dialect used to write application in AutoCAD. There were nearly a 100 of small programs in different files and throughout the whole project there were a lot repetitions that could not be factorized with AutoCAD means. Include, define and ifdef allowed to do things, that were very difficult to do at that time (it was on AutoCAD v9.0 which had only 64K memory for the LISP code).
> I also added the C preprocessor to the DBASE III and the compatible MS-DOS based Foxbase.

Fox, the speediest indexes in the country... what a time! :-P

/P
October 08, 2018
On Friday, 5 October 2018 at 21:34:38 UTC, Jonathan M Davis wrote:

> It's one of those things that I would have thought would just be obvious with experience, but if nothing else, some folks still try to stick to the whole "single return" idea even though I think that most folks agree at this point that it causes more problems than it solves.

Sadly, one of these "folks" is DMD's inliner. Then again, returns aren't it's only bane.
October 09, 2018
On Tuesday, 2 October 2018 at 18:14:55 UTC, Andrei Alexandrescu wrote:
> Kate Gregory makes a good argument on something I've often commented in code reviews: https://youtu.be/n0Ak6xtVXno?t=2682

I very much like LLVM's practices, and one of them is it's Coding Standards.
It prescribes early returns:
https://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code

It adds "use continue" to the early returns advice.  (The equivalent of "early returns" in loops.)

-Johan

1 2 3
Next ›   Last »